mirror of
https://github.com/angt/secret
synced 2025-01-14 08:01:32 +01:00
Add completion for yash
Signed-off-by: Adrien Gallouët <adrien@gallouet.fr>
This commit is contained in:
parent
6c27a5ca3d
commit
c9cb5bdf84
3 changed files with 13 additions and 2 deletions
|
@ -34,9 +34,9 @@ Then, run as `root`:
|
||||||
As usual, you can customize the destination with `DESTDIR` and `prefix`.
|
As usual, you can customize the destination with `DESTDIR` and `prefix`.
|
||||||
|
|
||||||
If you want the tab completion in `bash`, you have to do it manually for now.
|
If you want the tab completion in `bash`, you have to do it manually for now.
|
||||||
Luckily, it's super easy! Just download the file [argz.sh](argz/argz.sh) and then:
|
Luckily, it's super easy! Just download the file [argz.bash](argz/comp/argz.bash) and then:
|
||||||
|
|
||||||
$ . argz.sh
|
$ . argz.bash
|
||||||
$ complete -F _argz secret
|
$ complete -F _argz secret
|
||||||
|
|
||||||
It's exactly the same for `zsh` if you have enabled `bashcompinit'.
|
It's exactly the same for `zsh` if you have enabled `bashcompinit'.
|
||||||
|
|
11
argz/comp/argz.yash
Normal file
11
argz/comp/argz.yash
Normal file
|
@ -0,0 +1,11 @@
|
||||||
|
function completion/argz {
|
||||||
|
typeset opts
|
||||||
|
opts="$($WORDS help 2>/dev/null | awk '{print $1}')"
|
||||||
|
case "$opts" in
|
||||||
|
'') ;;
|
||||||
|
CMD) complete -c;;
|
||||||
|
DIR) complete -d;;
|
||||||
|
FILE) complete -f;;
|
||||||
|
*) complete -- $opts
|
||||||
|
esac
|
||||||
|
}
|
Loading…
Reference in a new issue