From 51a8337b6c461ac29710664ed084c99f57c4118a Mon Sep 17 00:00:00 2001 From: Giancarlo Razzolini Date: Sun, 6 Oct 2019 23:50:25 -0300 Subject: Add the hookdir option to both bash and zsh completion files --- shell/bash-completion | 4 ++-- shell/zsh-completion | 1 + 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/shell/bash-completion b/shell/bash-completion index a0f07dc..8f3663d 100644 --- a/shell/bash-completion +++ b/shell/bash-completion @@ -56,7 +56,7 @@ _files_from_dirs() { _mkinitcpio() { local action cur prev opts - opts=(-A --addhooks -c --config -g --generate -H --hookhelp -h --help -k --kernel + opts=(-A --addhooks -c --config -D --hookdir -g --generate -H --hookhelp -h --help -k --kernel -L --listhooks -M --automods -n --nocolor -P --allpresets -p --preset -r --moduleroot -S --skiphooks -s --save -t --builddir -V --version -v --verbose -z --compress) @@ -65,7 +65,7 @@ _mkinitcpio() { case $prev in -[cg]|--config|--generate) _filedir ;; - -r|--moduleroot|-t|--builddir) + -D|--hookdir|-r|--moduleroot|-t|--builddir) _filedir -d ;; -k|--kernel) _find_kernel_versions ;; diff --git a/shell/zsh-completion b/shell/zsh-completion index 4d1e435..587e3b2 100644 --- a/shell/zsh-completion +++ b/shell/zsh-completion @@ -39,6 +39,7 @@ case $service in _arguments : \ '(-A --addhooks)'{-A,--addhooks}'[Add specified hooks, comma separated, to image]::usr hooks:_path_files -W /usr/lib/initcpio/install::lib hooks:_path_files -W /lib/initcpio/install' \ '(-c --config)'{-c,--config}'[Use alternate config file. (default: /etc/mkinitcpio.conf)]:config files:_files' \ + '(-D --hookdir)'{-D,--hookdir}'[Specify where to look for hooks.]:directories:_files -/' \ '(-g --generate)'{-g,--generate}'[Generate cpio image and write to specified path]:config files:_files' \ '(-H --hookhelp)'{-H,--hookhelp}'[Display help for given hook and exit]::usr hooks:_path_files -W /usr/lib/initcpio/install::lib hooks:_path_files -W /lib/initcpio/install' \ '(-h --help)'{-h,--help}'[Display this message and exit]' \ -- cgit v1.2.3-24-g4f1b