-
-
Save snydergd/3944a5d106ca68d64a29 to your computer and use it in GitHub Desktop.
Bash completion for packagebuilder pb command
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# bash completion for packagebuilder pb command | |
# (wrapper for pacman and aur on Arch Linux) | |
_pb() { | |
local word; | |
word=${COMP_WORDS[$COMP_CWORD]}; | |
COMPREPLY=( $(pb -Ss "^${word}" 2>/dev/null | grep '^\S' | sed -e 's/^.*\/\(\S\+\)\s.*/\1/') ); | |
return 0; | |
} | |
complete -F _pb pb |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment