config/zsh: update completions
This commit is contained in:
parent
444a57acb3
commit
07e7109fa9
|
@ -1 +0,0 @@
|
|||
.zcompdump
|
|
@ -47,13 +47,15 @@ plugins=(
|
|||
)
|
||||
|
||||
_comp_options+=(globdots) # Show files starting with dot in autocomplete
|
||||
fpath=($fpath "$CONFIG_ZSH/zsh_completion") # Custom completions
|
||||
fpath=($fpath "$CONFIG_ZSH/completion") # Custom completions
|
||||
ZSH_COMPDUMP="$XDG_CACHE_HOME/zsh/zcompdump-$ZSH_VERSION" # Cache completions
|
||||
DISABLE_UPDATE_PROMPT=true
|
||||
ZSH_DISABLE_COMPFIX=true
|
||||
|
||||
source $ZSH/oh-my-zsh.sh
|
||||
|
||||
compdef wh=which
|
||||
|
||||
## Functions
|
||||
|
||||
tab_list_files() {
|
||||
|
|
|
@ -0,0 +1,2 @@
|
|||
#compdef edbin
|
||||
compadd $(echo $PATH | cut -d':' -f1 | xargs ls -pA)
|
|
@ -0,0 +1,2 @@
|
|||
#compdef edshell
|
||||
compadd -V unsorted zsh profile $(ls -pA $CONFIG_SHELLS)
|
|
@ -0,0 +1,2 @@
|
|||
#compdef git_rmbranch git_rebranch
|
||||
compadd $(git branch --format='%(refname:short)' | grep -v master | grep -v main)
|
|
@ -0,0 +1,6 @@
|
|||
#compdef gitclone gitremote
|
||||
_arguments '-hub[GitHub]:hub:->github.com' '-lab[Gitlab]:GitLab:->gitlab.com'
|
||||
case "$state" in
|
||||
(github.com|'""') compadd $(curl -s https://api.github.com/users/xerus2000/repos?per_page=100 | grep '"name"' | grep -v ' ' | cut -d'"' -f4);;
|
||||
(gitlab.com) _values -s , 'flags' a b c d e;;
|
||||
esac
|
|
@ -1,2 +0,0 @@
|
|||
#compdef editshell
|
||||
compadd $(ls -pA $SHELL_CONFIG | grep -v / )
|
|
@ -1,18 +0,0 @@
|
|||
#compdef gitclone
|
||||
_arguments '-hub[GitHub]:hub:->hub' '-lab[Gitlab]:GitLab:->lab'
|
||||
case "$state" in
|
||||
hub) compadd $(curl -s https://api.github.com/users/xerus2000/repos?per_page=100 | grep '"name"' | grep -v ' ' | cut -d'"' -f4);;
|
||||
lab) _values -s , 'flags' a b c d e;;
|
||||
esac
|
||||
|
||||
cur=$words[$CURRENT-1]
|
||||
unset 'words[-1]'
|
||||
case $cur in
|
||||
-p) compadd {13060..13069};;
|
||||
*)
|
||||
case $PREFIX in
|
||||
-*) compadd -- -p -g -min -v -vv -nodocker;;
|
||||
*) compadd $(find $projects_dir/softwarechallenge2018/clients -name "*.jar" | sed "s|.*Jumper-||" | sed "s|.jar||" | while read in; do for word in $words; do [ "$in" = "$word" ] && continue 2; done; echo $in; done)
|
||||
compadd -- -p -g -min -v -vv -nodocker;;
|
||||
esac
|
||||
esac
|
|
@ -1,2 +0,0 @@
|
|||
#compdef gitrmbranch gitrebranch
|
||||
compadd $(git branch | cut -c 3- | grep -v master)
|
Loading…
Reference in New Issue