-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.bash_aliases
95 lines (87 loc) · 2.69 KB
/
.bash_aliases
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
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
# vim {{{
if [[ -n $NVIM ]]; then
export PS1="» "
if [ -x $HOME/.local/bin/nvr ]; then
alias vim=$HOME/.local/bin/nvr
else
alias vim='echo no nesting'
fi
else
alias vim='nvim -u ~/.SpaceVim/vimrc'
GIT_PROMPT_THEME=Solarized
GIT_PROMPT_ONLY_IN_REPO=1
source ~/.bash-git-prompt/gitprompt.sh
fi
alias vi=vim
alias vimdiff='nvim -d -u ~/.SpaceVim/vimrc'
# }}}
# grep {{{
alias grep='grep --color=auto'
alias egrep='egrep --color=auto'
alias fgrep='fgrep --color=auto'
# }}}
alias tg='terragrunt'
alias tgab='tg apply tfplan.binary'
alias tfdm='terraform-docs markdown table . >README.md'
alias tgpht='env ENABLE_HELM_MANIFEST=true terragrunt plan'
alias tgphf='env -u ENABLE_HELM_MANIFEST terragrunt plan'
alias p5p='aws --profile=p5p'
alias am='aws --profile=master'
alias an='aws --profile=nonprod'
alias ap='aws --profile=prod'
alias as='aws --profile=sandbox'
alias at='aws --profile=stage'
acomp_path=$(which aws_completer)
if [[ $acomp_path ]]; then
complete -C $acomp_path aws
complete -C $acomp_path am
complete -C $acomp_path an
complete -C $acomp_path ap
complete -C $acomp_path as
complete -C $acomp_path at
complete -C $acomp_path p5p
fi
alias k=kubectl
complete -o default -F __start_kubectl k
alias er301='cd er-301; ./testing/linux/emu/emu.elf; cd -'
alias bi='beet import'
alias bim='beet import -m'
alias biC='beet import -C'
alias qlplaypause='quodlibet --play-pause'
alias qlvolume='quodlibet --volume '
alias qlnow='quodlibet --print-playing'
alias qlnext='quodlibet --next'
alias qlrating='quodlibet --set-rating'
alias qlscan='quodlibet --refresh'
alias qlquery-avg='quodlibet --query="&(grouping = &(!nopod),genre=&( !podcast, !spoken), #(rating >= 0.4))"'
alias qlquery-better='quodlibet --query="&(grouping = &(!nopod),genre=&( !podcast, !spoken), #(rating >= 0.6))"'
alias qlquery-recent='quodlibet --query="#(added<=2 weeks)"'
alias qlunqueue='quodlibet --unqueue="$(quodlibet --print-query-text)"'
alias qlenqueue='quodlibet --enqueue="$(quodlibet --print-query-text)"'
function qlbeetnow() {
if [[ $# -gt 0 ]]; then
full="$*"
set -x
else
full=$(quodlibet --print-playing)
fi
title=$(echo "$full" | sed 's/.* [0-9]\+\/[0-9]\+ - //')
# no track info available, use less precise split
if [[ $title = $full ]]; then
title=$(echo "$full" | sed 's/.* - //')
fi
artist=$(echo "$full" | sed 's/ -.*//')
beet ls -f '$artist - $album - $track - $title - $year - $genre - $comments - $grouping - $length $bitrate' \
title:"$title" artist:"$artist"
set +x
}
case `uname -s` in
Linux)
alias ls='ls --color=auto'
;;
Darwin|*[Bb][Ss][Dd]*)
alias top="top -o cpu -O rsize"
;;
esac
[[ $(type -t direnv) ]] && eval "$(direnv hook bash)"
# vim:ft=sh: