Merge pull request #1687 from NoahGorny/enforce-pre-commit-only-newlines
Enforce pre-commit newline fixespull/1695/head
commit
af6af2d932
|
|
@ -5,6 +5,7 @@ indent_style = space
|
||||||
indent_size = 2
|
indent_size = 2
|
||||||
end_of_line = lf
|
end_of_line = lf
|
||||||
charset = utf-8
|
charset = utf-8
|
||||||
|
|
||||||
trim_trailing_whitespace = true
|
trim_trailing_whitespace = true
|
||||||
insert_final_newline = true
|
insert_final_newline = true
|
||||||
|
|
||||||
|
|
@ -13,3 +14,17 @@ trim_trailing_whitespace = false
|
||||||
|
|
||||||
[.git*]
|
[.git*]
|
||||||
indent_style = tab
|
indent_style = tab
|
||||||
|
|
||||||
|
[*.*sh]
|
||||||
|
indent_style = tab
|
||||||
|
indent_size = 4
|
||||||
|
|
||||||
|
shell_variant = bash
|
||||||
|
binary_next_line = true # like -bn
|
||||||
|
switch_case_indent = true # like -ci
|
||||||
|
space_redirects = true # like -sr
|
||||||
|
keep_padding = true # like -kp
|
||||||
|
end_of_line = lf
|
||||||
|
charset = utf-8
|
||||||
|
trim_trailing_whitespace = true
|
||||||
|
insert_final_newline = true
|
||||||
|
|
|
||||||
|
|
@ -13,7 +13,7 @@ repos:
|
||||||
- id: mixed-line-ending
|
- id: mixed-line-ending
|
||||||
- id: check-added-large-files
|
- id: check-added-large-files
|
||||||
- repo: https://github.com/jumanjihouse/pre-commit-hooks
|
- repo: https://github.com/jumanjihouse/pre-commit-hooks
|
||||||
rev: 1.11.0
|
rev: 2.1.4
|
||||||
hooks:
|
hooks:
|
||||||
- id: git-check # Configure in .gitattributes
|
- id: git-check # Configure in .gitattributes
|
||||||
- id: shellcheck
|
- id: shellcheck
|
||||||
|
|
|
||||||
|
|
@ -24,7 +24,7 @@ jobs:
|
||||||
include:
|
include:
|
||||||
- language: go
|
- language: go
|
||||||
go: "1.14"
|
go: "1.14"
|
||||||
name: Ubuntu 18.04
|
name: pre-commit lint
|
||||||
dist: bionic
|
dist: bionic
|
||||||
sudo: required
|
sudo: required
|
||||||
before_script:
|
before_script:
|
||||||
|
|
|
||||||
|
|
@ -8,4 +8,3 @@ fi
|
||||||
alias please=fuck
|
alias please=fuck
|
||||||
alias plz=please
|
alias plz=please
|
||||||
alias fucking=sudo
|
alias fucking=sudo
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -6,4 +6,3 @@ alias node-dev='export NODE_ENV=development'
|
||||||
|
|
||||||
# alias to setup nodejs production environment
|
# alias to setup nodejs production environment
|
||||||
alias node-prod='export NODE_ENV=production'
|
alias node-prod='export NODE_ENV=production'
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -7,4 +7,3 @@ alias puplint="puppet-lint *.pp"
|
||||||
alias pupagt="puppet agent -t"
|
alias pupagt="puppet agent -t"
|
||||||
alias pupagtd="puppet agent -t --debug"
|
alias pupagtd="puppet agent -t --debug"
|
||||||
alias pupapp="puppet apply"
|
alias pupapp="puppet apply"
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -8,4 +8,3 @@ alias tfv='terraform validate'
|
||||||
alias tfp='terraform plan'
|
alias tfp='terraform plan'
|
||||||
alias tfa='terraform apply'
|
alias tfa='terraform apply'
|
||||||
alias tfd='terraform destory'
|
alias tfd='terraform destory'
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -13,4 +13,3 @@ alias tgva='terragrunt validate-all'
|
||||||
alias tgpa='terragrunt plan-all'
|
alias tgpa='terragrunt plan-all'
|
||||||
alias tgaa='terragrunt apply-all'
|
alias tgaa='terragrunt apply-all'
|
||||||
alias tgda='terragrunt destroy-all'
|
alias tgda='terragrunt destroy-all'
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -69,4 +69,3 @@ else
|
||||||
fi
|
fi
|
||||||
|
|
||||||
complete -F _python_django_completion -o default $pythons
|
complete -F _python_django_completion -o default $pythons
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -57,4 +57,3 @@ _homesick_complete()
|
||||||
}
|
}
|
||||||
|
|
||||||
complete -o bashdefault -o default -F _homesick_complete homesick
|
complete -o bashdefault -o default -F _homesick_complete homesick
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -28,4 +28,3 @@ _complete_invoke() {
|
||||||
# * -o default: when function generates no results, use filenames.
|
# * -o default: when function generates no results, use filenames.
|
||||||
# * positional args: program names to complete for.
|
# * positional args: program names to complete for.
|
||||||
complete -F _complete_invoke -o default invoke inv
|
complete -F _complete_invoke -o default invoke inv
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -3,4 +3,3 @@
|
||||||
if _command_exists kind; then
|
if _command_exists kind; then
|
||||||
eval "$(kind completion bash)"
|
eval "$(kind completion bash)"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -13,4 +13,3 @@ if command -v laravel > /dev/null; then
|
||||||
|
|
||||||
complete -F __laravel_completion laravel
|
complete -F __laravel_completion laravel
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,3 @@
|
||||||
|
|
||||||
if _command_exists ng; then
|
if _command_exists ng; then
|
||||||
# No longer supported, please see https://github.com/angular/angular-cli/issues/11043
|
# No longer supported, please see https://github.com/angular/angular-cli/issues/11043
|
||||||
# Fix courtesy of https://stackoverflow.com/questions/50194674/ng-completion-no-longer-exists
|
# Fix courtesy of https://stackoverflow.com/questions/50194674/ng-completion-no-longer-exists
|
||||||
|
|
|
||||||
|
|
@ -161,4 +161,3 @@ _packer_completion ()
|
||||||
}
|
}
|
||||||
|
|
||||||
complete -o nospace -F _packer_completion packer
|
complete -o nospace -F _packer_completion packer
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -8,4 +8,3 @@
|
||||||
if command -v pip3 >/dev/null; then
|
if command -v pip3 >/dev/null; then
|
||||||
eval "$(pip3 completion --bash)"
|
eval "$(pip3 completion --bash)"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -44,4 +44,3 @@ _pj() {
|
||||||
|
|
||||||
complete -F _pj -o nospace pj
|
complete -F _pj -o nospace pj
|
||||||
complete -F _pj -o nospace pjo
|
complete -F _pj -o nospace pjo
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -35,10 +35,10 @@ _salt(){
|
||||||
cur="${COMP_WORDS[COMP_CWORD]}"
|
cur="${COMP_WORDS[COMP_CWORD]}"
|
||||||
prev="${COMP_WORDS[COMP_CWORD-1]}"
|
prev="${COMP_WORDS[COMP_CWORD-1]}"
|
||||||
if [ ${COMP_CWORD} -gt 2 ]; then
|
if [ ${COMP_CWORD} -gt 2 ]; then
|
||||||
pprev="${COMP_WORDS[COMP_CWORD-2]}"
|
pprev="${COMP_WORDS[COMP_CWORD-2]}"
|
||||||
fi
|
fi
|
||||||
if [ ${COMP_CWORD} -gt 3 ]; then
|
if [ ${COMP_CWORD} -gt 3 ]; then
|
||||||
ppprev="${COMP_WORDS[COMP_CWORD-3]}"
|
ppprev="${COMP_WORDS[COMP_CWORD-3]}"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
opts="-h --help -d --doc --documentation --version --versions-report -c \
|
opts="-h --help -d --doc --documentation --version --versions-report -c \
|
||||||
|
|
@ -96,7 +96,7 @@ _salt(){
|
||||||
-G|--grain|--grain-pcre)
|
-G|--grain|--grain-pcre)
|
||||||
COMPREPLY=($(compgen -W "$(_salt_get_grains)" -- ${cur}))
|
COMPREPLY=($(compgen -W "$(_salt_get_grains)" -- ${cur}))
|
||||||
return 0
|
return 0
|
||||||
;;
|
;;
|
||||||
-C|--compound)
|
-C|--compound)
|
||||||
COMPREPLY=() # TODO: finish this one? how?
|
COMPREPLY=() # TODO: finish this one? how?
|
||||||
return 0
|
return 0
|
||||||
|
|
@ -110,7 +110,7 @@ _salt(){
|
||||||
return 0
|
return 0
|
||||||
;;
|
;;
|
||||||
-N|--nodegroup)
|
-N|--nodegroup)
|
||||||
MASTER_CONFIG='/etc/salt/master'
|
MASTER_CONFIG='/etc/salt/master'
|
||||||
COMPREPLY=($(compgen -W "`awk -F ':' 'BEGIN {print_line = 0}; /^nodegroups/ {print_line = 1;getline } print_line && /^ */ {print $1} /^[^ ]/ {print_line = 0}' <${MASTER_CONFIG}`" -- ${cur}))
|
COMPREPLY=($(compgen -W "`awk -F ':' 'BEGIN {print_line = 0}; /^nodegroups/ {print_line = 1;getline } print_line && /^ */ {print $1} /^[^ ]/ {print_line = 0}' <${MASTER_CONFIG}`" -- ${cur}))
|
||||||
return 0
|
return 0
|
||||||
;;
|
;;
|
||||||
|
|
@ -193,7 +193,7 @@ _saltkey(){
|
||||||
return 0
|
return 0
|
||||||
;;
|
;;
|
||||||
--accept-all)
|
--accept-all)
|
||||||
return 0
|
return 0
|
||||||
;;
|
;;
|
||||||
esac
|
esac
|
||||||
COMPREPLY=($(compgen -W "${opts} " -- ${cur}))
|
COMPREPLY=($(compgen -W "${opts} " -- ${cur}))
|
||||||
|
|
@ -230,21 +230,21 @@ _saltcall(){
|
||||||
fi
|
fi
|
||||||
|
|
||||||
case ${prev} in
|
case ${prev} in
|
||||||
-m|--module-dirs)
|
-m|--module-dirs)
|
||||||
COMPREPLY=( $(compgen -d ${cur} ))
|
COMPREPLY=( $(compgen -d ${cur} ))
|
||||||
return 0
|
return 0
|
||||||
;;
|
;;
|
||||||
-l|--log-level)
|
-l|--log-level)
|
||||||
COMPREPLY=( $(compgen -W "info none garbage trace warning error debug" -- ${cur}))
|
COMPREPLY=( $(compgen -W "info none garbage trace warning error debug" -- ${cur}))
|
||||||
return 0
|
return 0
|
||||||
;;
|
;;
|
||||||
-g|grains)
|
-g|grains)
|
||||||
return 0
|
return 0
|
||||||
;;
|
;;
|
||||||
salt-call)
|
salt-call)
|
||||||
COMPREPLY=($(compgen -W "${opts}" -- ${cur}))
|
COMPREPLY=($(compgen -W "${opts}" -- ${cur}))
|
||||||
return 0
|
return 0
|
||||||
;;
|
;;
|
||||||
esac
|
esac
|
||||||
|
|
||||||
_salt_coms="$(salt-call --out=txt -- sys.list_functions|sed 's/^.*\[//' | tr -d ",']" )"
|
_salt_coms="$(salt-call --out=txt -- sys.list_functions|sed 's/^.*\[//' | tr -d ",']" )"
|
||||||
|
|
@ -279,46 +279,46 @@ _saltcp(){
|
||||||
fi
|
fi
|
||||||
|
|
||||||
case ${prev} in
|
case ${prev} in
|
||||||
salt-cp)
|
salt-cp)
|
||||||
COMPREPLY=($(compgen -W "${opts} `salt-key -l acc --no-color`" -- ${cur}))
|
COMPREPLY=($(compgen -W "${opts} `salt-key -l acc --no-color`" -- ${cur}))
|
||||||
return 0
|
return 0
|
||||||
;;
|
;;
|
||||||
-t|--timeout)
|
-t|--timeout)
|
||||||
# those numbers are just a hint
|
# those numbers are just a hint
|
||||||
COMPREPLY=($(compgen -W "2 3 4 8 10 15 20 25 30 40 60 90 120 180 240 300" -- ${cur} ))
|
COMPREPLY=($(compgen -W "2 3 4 8 10 15 20 25 30 40 60 90 120 180 240 300" -- ${cur} ))
|
||||||
return 0
|
return 0
|
||||||
;;
|
;;
|
||||||
-E|--pcre)
|
-E|--pcre)
|
||||||
COMPREPLY=($(compgen -W "`salt-key -l acc --no-color`" -- ${cur}))
|
COMPREPLY=($(compgen -W "`salt-key -l acc --no-color`" -- ${cur}))
|
||||||
return 0
|
return 0
|
||||||
;;
|
;;
|
||||||
-L|--list)
|
-L|--list)
|
||||||
# IMPROVEMENTS ARE WELCOME
|
# IMPROVEMENTS ARE WELCOME
|
||||||
prefpart="${cur%,*},"
|
prefpart="${cur%,*},"
|
||||||
postpart=${cur##*,}
|
postpart=${cur##*,}
|
||||||
filt="^\($(echo ${cur}| sed 's:,:\\|:g')\)$"
|
filt="^\($(echo ${cur}| sed 's:,:\\|:g')\)$"
|
||||||
helper=($(salt-key -l acc --no-color | grep -v "${filt}" | sed "s/^/${prefpart}/"))
|
helper=($(salt-key -l acc --no-color | grep -v "${filt}" | sed "s/^/${prefpart}/"))
|
||||||
COMPREPLY=($(compgen -W "${helper[*]}" -- ${cur}))
|
COMPREPLY=($(compgen -W "${helper[*]}" -- ${cur}))
|
||||||
|
|
||||||
return 0
|
return 0
|
||||||
;;
|
;;
|
||||||
-G|--grain|--grain-pcre)
|
-G|--grain|--grain-pcre)
|
||||||
COMPREPLY=($(compgen -W "$(_salt_get_grains)" -- ${cur}))
|
COMPREPLY=($(compgen -W "$(_salt_get_grains)" -- ${cur}))
|
||||||
return 0
|
return 0
|
||||||
;;
|
;;
|
||||||
# FIXME
|
# FIXME
|
||||||
-R|--range)
|
-R|--range)
|
||||||
# FIXME ??
|
# FIXME ??
|
||||||
return 0
|
return 0
|
||||||
;;
|
;;
|
||||||
-C|--compound)
|
-C|--compound)
|
||||||
# FIXME ??
|
# FIXME ??
|
||||||
return 0
|
return 0
|
||||||
;;
|
;;
|
||||||
-c|--config)
|
-c|--config)
|
||||||
COMPREPLY=($(compgen -f -- ${cur}))
|
COMPREPLY=($(compgen -f -- ${cur}))
|
||||||
return 0
|
return 0
|
||||||
;;
|
;;
|
||||||
esac
|
esac
|
||||||
|
|
||||||
# default is using opts:
|
# default is using opts:
|
||||||
|
|
@ -326,4 +326,3 @@ _saltcp(){
|
||||||
}
|
}
|
||||||
|
|
||||||
complete -F _saltcp salt-cp
|
complete -F _saltcp salt-cp
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -28,4 +28,3 @@ __kitchen_options () {
|
||||||
esac
|
esac
|
||||||
}
|
}
|
||||||
complete -F __kitchen_options kitchen
|
complete -F __kitchen_options kitchen
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -185,4 +185,3 @@ _tmux() {
|
||||||
complete -F _tmux tmux
|
complete -F _tmux tmux
|
||||||
|
|
||||||
# END tmux completion
|
# END tmux completion
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -10,13 +10,13 @@ __vboxmanage_startvm() {
|
||||||
|
|
||||||
AVAILABLE=""
|
AVAILABLE=""
|
||||||
for VM in $TOTAL; do
|
for VM in $TOTAL; do
|
||||||
MATCH=0;
|
MATCH=0;
|
||||||
for RUN in $RUNNING "x"; do
|
for RUN in $RUNNING "x"; do
|
||||||
if [ "$VM" == "$RUN" ]; then
|
if [ "$VM" == "$RUN" ]; then
|
||||||
MATCH=1
|
MATCH=1
|
||||||
fi
|
fi
|
||||||
done
|
done
|
||||||
(( $MATCH == 0 )) && AVAILABLE="$AVAILABLE $VM "
|
(( $MATCH == 0 )) && AVAILABLE="$AVAILABLE $VM "
|
||||||
done
|
done
|
||||||
echo $AVAILABLE
|
echo $AVAILABLE
|
||||||
}
|
}
|
||||||
|
|
@ -26,14 +26,14 @@ __vboxmanage_list() {
|
||||||
|
|
||||||
PRUNED=""
|
PRUNED=""
|
||||||
if [ "$1" == "long" ]; then
|
if [ "$1" == "long" ]; then
|
||||||
for WORD in $INPUT; do
|
for WORD in $INPUT; do
|
||||||
[ "$WORD" == "-l" ] && continue;
|
[ "$WORD" == "-l" ] && continue;
|
||||||
[ "$WORD" == "--long" ] && continue;
|
[ "$WORD" == "--long" ] && continue;
|
||||||
|
|
||||||
PRUNED="$PRUNED $WORD"
|
PRUNED="$PRUNED $WORD"
|
||||||
done
|
done
|
||||||
else
|
else
|
||||||
PRUNED=$INPUT
|
PRUNED=$INPUT
|
||||||
fi
|
fi
|
||||||
|
|
||||||
echo $PRUNED
|
echo $PRUNED
|
||||||
|
|
@ -43,14 +43,14 @@ __vboxmanage_list() {
|
||||||
__vboxmanage_list_vms() {
|
__vboxmanage_list_vms() {
|
||||||
VMS=""
|
VMS=""
|
||||||
if [ "x$1" == "x" ]; then
|
if [ "x$1" == "x" ]; then
|
||||||
SEPARATOR=" "
|
SEPARATOR=" "
|
||||||
else
|
else
|
||||||
SEPARATOR=$1
|
SEPARATOR=$1
|
||||||
fi
|
fi
|
||||||
|
|
||||||
for VM in $(vboxmanage list vms | cut -d' ' -f1 | tr -d '"'); do
|
for VM in $(vboxmanage list vms | cut -d' ' -f1 | tr -d '"'); do
|
||||||
[ "$VMS" != "" ] && VMS="${VMS}${SEPARATOR}"
|
[ "$VMS" != "" ] && VMS="${VMS}${SEPARATOR}"
|
||||||
VMS="${VMS}${VM}"
|
VMS="${VMS}${VM}"
|
||||||
done
|
done
|
||||||
|
|
||||||
echo $VMS
|
echo $VMS
|
||||||
|
|
@ -59,14 +59,14 @@ __vboxmanage_list_vms() {
|
||||||
__vboxmanage_list_runningvms() {
|
__vboxmanage_list_runningvms() {
|
||||||
VMS=""
|
VMS=""
|
||||||
if [ "$1" == "" ]; then
|
if [ "$1" == "" ]; then
|
||||||
SEPARATOR=" "
|
SEPARATOR=" "
|
||||||
else
|
else
|
||||||
SEPARATOR=$1
|
SEPARATOR=$1
|
||||||
fi
|
fi
|
||||||
|
|
||||||
for VM in $(vboxmanage list runningvms | cut -d' ' -f1 | tr -d '"'); do
|
for VM in $(vboxmanage list runningvms | cut -d' ' -f1 | tr -d '"'); do
|
||||||
[ "$VMS" != "" ] && VMS="${VMS}${SEPARATOR}"
|
[ "$VMS" != "" ] && VMS="${VMS}${SEPARATOR}"
|
||||||
VMS="${VMS}${VM}"
|
VMS="${VMS}${VM}"
|
||||||
done
|
done
|
||||||
|
|
||||||
echo $VMS
|
echo $VMS
|
||||||
|
|
@ -102,40 +102,40 @@ __vboxmanage_default() {
|
||||||
# echo "DEBUG: cur: $cur, prev: $prev"
|
# echo "DEBUG: cur: $cur, prev: $prev"
|
||||||
# echo "DEBUG: default: |$p1|$p2|$p3|$p4|"
|
# echo "DEBUG: default: |$p1|$p2|$p3|$p4|"
|
||||||
case ${cur} in
|
case ${cur} in
|
||||||
-*)
|
-*)
|
||||||
echo $opts
|
echo $opts
|
||||||
# COMPREPLY=($(compgen -W "${opts}" -- ${cur}))
|
# COMPREPLY=($(compgen -W "${opts}" -- ${cur}))
|
||||||
return 0
|
return 0
|
||||||
;;
|
;;
|
||||||
esac;
|
esac;
|
||||||
|
|
||||||
for WORD in $opts; do
|
for WORD in $opts; do
|
||||||
MATCH=0
|
MATCH=0
|
||||||
for OPT in "${COMP_WORDS[@]}"; do
|
for OPT in "${COMP_WORDS[@]}"; do
|
||||||
# opts=$(echo ${opts} | grep -v $OPT);
|
# opts=$(echo ${opts} | grep -v $OPT);
|
||||||
if [ "$OPT" == "$WORD" ]; then
|
if [ "$OPT" == "$WORD" ]; then
|
||||||
MATCH=1
|
MATCH=1
|
||||||
break;
|
break;
|
||||||
fi
|
fi
|
||||||
if [ "$OPT" == "-v" ] && [ "$WORD" == "--version" ]; then
|
if [ "$OPT" == "-v" ] && [ "$WORD" == "--version" ]; then
|
||||||
MATCH=1
|
MATCH=1
|
||||||
break;
|
break;
|
||||||
fi
|
fi
|
||||||
if [ "$OPT" == "--version" ] && [ "$WORD" == "-v" ]; then
|
if [ "$OPT" == "--version" ] && [ "$WORD" == "-v" ]; then
|
||||||
MATCH=1
|
MATCH=1
|
||||||
break;
|
break;
|
||||||
fi
|
fi
|
||||||
if [ "$OPT" == "-q" ] && [ "$WORD" == "--nologo" ]; then
|
if [ "$OPT" == "-q" ] && [ "$WORD" == "--nologo" ]; then
|
||||||
MATCH=1
|
MATCH=1
|
||||||
break;
|
break;
|
||||||
fi
|
fi
|
||||||
if [ "$OPT" == "--nologo" ] && [ "$WORD" == "-q" ]; then
|
if [ "$OPT" == "--nologo" ] && [ "$WORD" == "-q" ]; then
|
||||||
MATCH=1
|
MATCH=1
|
||||||
break;
|
break;
|
||||||
fi
|
fi
|
||||||
done
|
done
|
||||||
(( $MATCH == 1 )) && continue;
|
(( $MATCH == 1 )) && continue;
|
||||||
pruned="$pruned $WORD"
|
pruned="$pruned $WORD"
|
||||||
|
|
||||||
done
|
done
|
||||||
|
|
||||||
|
|
@ -156,65 +156,65 @@ _vboxmanage() {
|
||||||
|
|
||||||
# In case current is complete command
|
# In case current is complete command
|
||||||
case $cur in
|
case $cur in
|
||||||
startvm|list|controlvm)
|
startvm|list|controlvm)
|
||||||
COMPREPLY=($(compgen -W "$cur "))
|
COMPREPLY=($(compgen -W "$cur "))
|
||||||
return 0
|
return 0
|
||||||
;;
|
;;
|
||||||
esac
|
esac
|
||||||
|
|
||||||
case $prev in
|
case $prev in
|
||||||
-v|--version)
|
-v|--version)
|
||||||
return 0
|
return 0
|
||||||
;;
|
;;
|
||||||
|
|
||||||
-l|--long)
|
-l|--long)
|
||||||
opts=$(__vboxmanage_list "long")
|
opts=$(__vboxmanage_list "long")
|
||||||
COMPREPLY=($(compgen -W "${opts}" -- ${cur}))
|
COMPREPLY=($(compgen -W "${opts}" -- ${cur}))
|
||||||
return 0
|
return 0
|
||||||
;;
|
;;
|
||||||
startvm|list)
|
startvm|list)
|
||||||
opts=$(__vboxmanage_$prev)
|
opts=$(__vboxmanage_$prev)
|
||||||
COMPREPLY=($(compgen -W "${opts}" -- ${cur}))
|
COMPREPLY=($(compgen -W "${opts}" -- ${cur}))
|
||||||
return 0
|
return 0
|
||||||
;;
|
;;
|
||||||
--type)
|
--type)
|
||||||
COMPREPLY=($(compgen -W "gui headless" -- ${cur}))
|
COMPREPLY=($(compgen -W "gui headless" -- ${cur}))
|
||||||
return 0
|
return 0
|
||||||
;;
|
;;
|
||||||
gui|headless)
|
gui|headless)
|
||||||
# Done. no more completion possible
|
# Done. no more completion possible
|
||||||
return 0
|
return 0
|
||||||
;;
|
;;
|
||||||
vboxmanage|-q|--nologo)
|
vboxmanage|-q|--nologo)
|
||||||
# echo "Got vboxmanage"
|
# echo "Got vboxmanage"
|
||||||
opts=$(__vboxmanage_default)
|
opts=$(__vboxmanage_default)
|
||||||
COMPREPLY=($(compgen -W "${opts}" -- ${cur}))
|
COMPREPLY=($(compgen -W "${opts}" -- ${cur}))
|
||||||
return 0
|
return 0
|
||||||
;;
|
;;
|
||||||
controlvm)
|
controlvm)
|
||||||
opts=$(__vboxmanage_list_vms)
|
opts=$(__vboxmanage_list_vms)
|
||||||
COMPREPLY=($(compgen -W "${opts}" -- ${cur}))
|
COMPREPLY=($(compgen -W "${opts}" -- ${cur}))
|
||||||
return 0
|
return 0
|
||||||
;;
|
;;
|
||||||
esac
|
esac
|
||||||
|
|
||||||
for VM in $(__vboxmanage_list_vms); do
|
for VM in $(__vboxmanage_list_vms); do
|
||||||
if [ "$VM" == "$prev" ]; then
|
if [ "$VM" == "$prev" ]; then
|
||||||
pprev=${COMP_WORDS[COMP_CWORD-2]}
|
pprev=${COMP_WORDS[COMP_CWORD-2]}
|
||||||
# echo "previous: $pprev"
|
# echo "previous: $pprev"
|
||||||
case $pprev in
|
case $pprev in
|
||||||
startvm)
|
startvm)
|
||||||
opts="--type"
|
opts="--type"
|
||||||
COMPREPLY=($(compgen -W "${opts}" -- ${cur}))
|
COMPREPLY=($(compgen -W "${opts}" -- ${cur}))
|
||||||
return 0
|
return 0
|
||||||
;;
|
;;
|
||||||
controlvm)
|
controlvm)
|
||||||
opts=$(__vboxmanage_controlvm)
|
opts=$(__vboxmanage_controlvm)
|
||||||
COMPREPLY=($(compgen -W "${opts}" -- ${cur}))
|
COMPREPLY=($(compgen -W "${opts}" -- ${cur}))
|
||||||
return 0;
|
return 0;
|
||||||
;;
|
;;
|
||||||
esac
|
esac
|
||||||
fi
|
fi
|
||||||
done
|
done
|
||||||
|
|
||||||
# echo "Got to end withoug completion"
|
# echo "Got to end withoug completion"
|
||||||
|
|
|
||||||
|
|
@ -13,4 +13,3 @@ if command -v wpscan > /dev/null; then
|
||||||
|
|
||||||
complete -F __wpscan_completion wpscan
|
complete -F __wpscan_completion wpscan
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -21,4 +21,3 @@ explain () {
|
||||||
echo "explain 'cmd -o | ...' one quoted command to explain it."
|
echo "explain 'cmd -o | ...' one quoted command to explain it."
|
||||||
fi
|
fi
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -273,5 +273,3 @@ function gitignore-reload() {
|
||||||
echo >&2 "Files readded. Commit your new changes now."
|
echo >&2 "Files readded. Commit your new changes now."
|
||||||
fi
|
fi
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -19,4 +19,3 @@ function gw() {
|
||||||
# Call gradle
|
# Call gradle
|
||||||
"${result}" $*
|
"${result}" $*
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -84,4 +84,3 @@ function postgres_serverlog {
|
||||||
# tail -500 $PGDATA/pg_log/`ls -Art $PGDATA/pg_log | tail -n 1` | less
|
# tail -500 $PGDATA/pg_log/`ls -Art $PGDATA/pg_log | tail -n 1` | less
|
||||||
# }
|
# }
|
||||||
#
|
#
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -6,4 +6,3 @@ about-plugin 'Load Software Development Kit Manager'
|
||||||
export SDKMAN_DIR=${SDKMAN_DIR:-$HOME/.sdkman}
|
export SDKMAN_DIR=${SDKMAN_DIR:-$HOME/.sdkman}
|
||||||
|
|
||||||
[[ -s "${SDKMAN_DIR}/bin/sdkman-init.sh" ]] && source "${SDKMAN_DIR}/bin/sdkman-init.sh"
|
[[ -s "${SDKMAN_DIR}/bin/sdkman-init.sh" ]] && source "${SDKMAN_DIR}/bin/sdkman-init.sh"
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -225,4 +225,3 @@ function __powerline_prompt_command {
|
||||||
LEFT_PROMPT \
|
LEFT_PROMPT \
|
||||||
SEGMENTS_AT_LEFT
|
SEGMENTS_AT_LEFT
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -1,2 +1 @@
|
||||||
liquidprompt
|
liquidprompt
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -26,4 +26,3 @@ Here it is in action:
|
||||||
## Usage Scenario
|
## Usage Scenario
|
||||||
|
|
||||||
This theme is especially useful when connecting to many different machines and switching between them often. Yes, the hostname *is* present in the prompt. But I argue that it's a lot faster to get a "feel" of what machine you are currently on because of the custom colors on that machine's prompt than by reading the hostname.
|
This theme is especially useful when connecting to many different machines and switching between them often. Yes, the hostname *is* present in the prompt. But I argue that it's a lot faster to get a "feel" of what machine you are currently on because of the custom colors on that machine's prompt than by reading the hostname.
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -20,9 +20,9 @@ function prompt() {
|
||||||
# We have color support; assume it's compliant with Ecma-48
|
# We have color support; assume it's compliant with Ecma-48
|
||||||
# (ISO/IEC-6429). (Lack of such support is extremely rare, and such
|
# (ISO/IEC-6429). (Lack of such support is extremely rare, and such
|
||||||
# a case would tend to support setf rather than setaf.)
|
# a case would tend to support setf rather than setaf.)
|
||||||
local color_prompt=yes
|
local color_prompt=yes
|
||||||
else
|
else
|
||||||
local color_prompt=
|
local color_prompt=
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -280,4 +280,3 @@ function __powerline_prompt_command {
|
||||||
LEFT_PROMPT \
|
LEFT_PROMPT \
|
||||||
SEGMENTS_AT_LEFT
|
SEGMENTS_AT_LEFT
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -182,4 +182,3 @@ function powerline_prompt_command() {
|
||||||
}
|
}
|
||||||
|
|
||||||
PROMPT_COMMAND=powerline_prompt_command
|
PROMPT_COMMAND=powerline_prompt_command
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue