update "re" completion

This commit is contained in:
crater2150 2018-03-11 12:19:47 +01:00
parent a64e38b305
commit d74011b8dc
2 changed files with 6 additions and 3 deletions

View file

@ -1,3 +1,7 @@
#compdef re
_arguments -A "*" '-d[directory]:dirname:_dirs' ":script:_files -W $XDG_CONFIG_HOME/re/"
_arguments -A "*" \
'--dir[directory]:dirname:_dirs' '-d[directory]:dirname:_dirs' \
'--dry-run[dont run, just display]' '-n[dont run, just display]' \
'--edit[open in editor]' '-e[open in editor]' \
":script:_files -W $XDG_CONFIG_HOME/re/"

View file

@ -1,6 +1,5 @@
# autoload completions
fpath+=( "${ZDOTDIR:+ZDOTDIR}/compdef" )
fpath+=( "/etc/zsh/compdef" )
fpath=( "${ZDOTDIR:+ZDOTDIR}/compdef" "/etc/zsh/compdef" $fpath )
autoload -U /etc/zsh/compdef/*(:t)
if [[ -d $ZDOTDIR/compdef ]]; then