-
Notifications
You must be signed in to change notification settings - Fork 1
/
.bash_functions
42 lines (32 loc) · 878 Bytes
/
.bash_functions
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
#!/usr/bin/env bash
set_window_title() {
export FORCED_WINDOW_TITLE="$@"
printf '\e]2;%s\a' "$@"
}
unset_window_title() {
unset FORCED_WINDOW_TITLE
printf '\e]2;%s\a' "${DEFAULT_WINDOW_TITLE:-${USERNAME}@${HOSTNAME} - $(pwd)}"
}
function is_win() {
case "$(uname -s)" in
CYGWIN*|MINGW*) return 0 ;;
*) return 1 ;;
esac
}
function home_path() {
is_win &&
echo "$USERPROFILE\\${1//\//\\}" ||
echo "$HOME/$1"
}
git-context-graph-page() {
local lines=$(( LINES - 8 ))
gg "-n${lines}" "$@" | head -n $lines
}
################################################################################
# Laravel Homestead
homestead () {
( cd ~/www/Homestead && vagrant $* )
}
################################################################################
# Docker
source ~/.dotfiles/dockerize-clis/dockerize-clis.sh