diff --git a/etc/bash_completion.d/pachook-completion b/etc/bash_completion.d/pachook-completion new file mode 100644 index 0000000..b0b7d3f --- /dev/null +++ b/etc/bash_completion.d/pachook-completion @@ -0,0 +1,11 @@ +__pachook() +{ + if [ "${#COMP_WORDS[@]}" != "2" ]; then + return + fi + + COMPREPLY=($(compgen -W "cat edit enable disable list" "${COMP_WORDS[1]}")) + +} + + complete -F __pachook pachook diff --git a/pachook b/pachook index f00a53c..f0a47c0 100755 --- a/pachook +++ b/pachook @@ -271,6 +271,6 @@ case "$1" in create) hook.create "$2";; enable|start) hook.setstate "${hook}" enable;; disable|stop) hook.setstate "${hook}" disable;; - -h) usage;; + -h|--help) usage;; *) hooks.view esac diff --git a/readme.md b/readme.md index c242597..b1f6b09 100644 --- a/readme.md +++ b/readme.md @@ -7,7 +7,7 @@ Archlinux pacman hooks administrator with disabled exemples ## Installation With AUR : - yaourt -S pachook + yay -S pachook or :