Skip to content

Commit

Permalink
Merge pull request #1 from MohamedElsiddig/master
Browse files Browse the repository at this point in the history
basic completion
  • Loading branch information
papajoker authored Apr 10, 2023
2 parents 5d6fe4f + 9b9e53d commit fe0f91a
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 2 deletions.
11 changes: 11 additions & 0 deletions etc/bash_completion.d/pachook-completion
Original file line number Diff line number Diff line change
@@ -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
2 changes: 1 addition & 1 deletion pachook
Original file line number Diff line number Diff line change
Expand Up @@ -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
2 changes: 1 addition & 1 deletion readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ Archlinux pacman hooks administrator with disabled exemples
## Installation
With AUR :

yaourt -S pachook
yay -S pachook

or :

Expand Down

0 comments on commit fe0f91a

Please sign in to comment.