diff options
author | V3n3RiX <venerix@redcorelinux.org> | 2017-10-09 18:53:29 +0100 |
---|---|---|
committer | V3n3RiX <venerix@redcorelinux.org> | 2017-10-09 18:53:29 +0100 |
commit | 4f2d7949f03e1c198bc888f2d05f421d35c57e21 (patch) | |
tree | ba5f07bf3f9d22d82e54a462313f5d244036c768 /app-crypt/shash/files/shash.bash-completion |
reinit the tree, so we can have metadata
Diffstat (limited to 'app-crypt/shash/files/shash.bash-completion')
-rw-r--r-- | app-crypt/shash/files/shash.bash-completion | 38 |
1 files changed, 38 insertions, 0 deletions
diff --git a/app-crypt/shash/files/shash.bash-completion b/app-crypt/shash/files/shash.bash-completion new file mode 100644 index 000000000000..15a677dce5ba --- /dev/null +++ b/app-crypt/shash/files/shash.bash-completion @@ -0,0 +1,38 @@ +# Copyright 1999-2014 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# +# shash(1) completion. + +_shash() { + local cur prev + + COMPREPLY=() + cur=${COMP_WORDS[COMP_CWORD]} + prev=${COMP_WORDS[COMP_CWORD-1]} + + case "${prev}" in + -c|--config) + _filedir + return 0 ;; + -o|--keymode) + COMPREPLY=( $( compgen -W "$( shash --listkeygen | tail -n +2 )" \ + -- ${cur} ) ) + return ;; + -a|--algorithm) + COMPREPLY=( $( compgen -W "$( shash --list )" \ + -- ${cur} ) ) + return ;; + *) + ;; + esac + + COMPREPLY=( $( compgen -W '-V -q -m -d -c -b -t -o -i -a -l -k -h -v \ + -L \ + --verbose --quiet --nosalt --time --hmac --doublecheck \ + --check --binary --text --keymode --config --algorithm \ + --list --key --listkeygen --help --version --license' \ + -- ${cur} ) ) + _filedir + return 0 +} +complete -F _shash ${filenames} shash |