-
Notifications
You must be signed in to change notification settings - Fork 0
/
bootstrap.sh
50 lines (41 loc) · 1.57 KB
/
bootstrap.sh
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
43
44
45
46
47
48
49
50
DOTFILES_BASE=~/dotfiles
# Source files
source_aliases () {
source $DOTFILES_BASE/aliases/exports.sh
source $DOTFILES_BASE/aliases/aliases.sh
source $DOTFILES_BASE/aliases/git.sh
source $DOTFILES_BASE/aliases/docker.sh
source $DOTFILES_BASE/aliases/laravel.sh
source ~/dotfiles/scripts/bitbucket_pr.sh
if [[ -f "$DOTFILES_BASE/environment/bash.sh" ]]; then
source "$DOTFILES_BASE/environment/bash.sh"
fi
if [[ "$OSTYPE" == "darwin"* ]]; then
source $DOTFILES_BASE/aliases/macos.sh
elif [[ "$OSTYPE" == "linux"* ]]; then
source $DOTFILES_BASE/aliases/linux.sh
elif [[ "$OSTYPE" == "msys"* ]]; then
source $DOTFILES_BASE/aliases/windows.sh
fi
}
source_aliases
# Script Aliases
alias ip="php '$DOTFILES_BASE/scripts/php/ip.php'"
alias pr="php '$DOTFILES_BASE/scripts/php/bitbucket-pull-request.php'"
# Psysh
alias p="$DOTFILES_BASE/psysh --color --cwd $(pwd) --config '$DOTFILES_BASE/scripts/php/psysh_user.php'"
psysh-update() {
local download_path="$DOTFILES_BASE/psysh"
curl -o "$download_path" https://psysh.org/psysh
chmod +x "$download_path"
echo "Ok";
p
}
_bb_autocomplete() {
local pipeline_commands="get latest wait run"
local pr_commands="list diff commits approve no-approve request-changes no-request-changes decline merge create"
local branch_commands="list user name"
local auth_commands="save show"
_arguments "1: :(pr pipeline branch auth browse upgrade)" "2: :(help $pipeline_commands $pr_commands $branch_commands $auth_commands)"
}
compdef _bb_autocomplete bb