Permalink
Browse files

bash_completion: add completion for --ignorerepo

  • Loading branch information...
1 parent 6027e19 commit 28f774ce5797a0bf383ed938e876ee6b4babaf44 @falconindy committed Mar 7, 2011
Showing with 2 additions and 0 deletions.
  1. +2 −0 bash_completion
View
@@ -23,6 +23,8 @@ _cower() {
i=${COMPREPLY[0]}
[[ "$i" == $cur && "$i" != */ ]] && COMPREPLY[0]="${i}/"
fi
+ elif [[ $prev = --ignorerepo ]]; then
+ COMPREPLY=($(compgen -W "$(sed '/^\[\(.*\)\]$/!d;s//\1/;/options/d' /etc/pacman.conf)" -- $cur))
elif [[ ${COMP_WORDS[@]:1:n-2} = *-@(!(-*)@(u)*|-update)* ]]; then # local packages
COMPREPLY=($(compgen -W "$(pacman -Qqm)" -- $cur))
elif [[ ${COMP_WORDS[@]:1:n-2} = *-@(!(-*)@(d|i)*|-download|-info)* ]]; then # aur packages

0 comments on commit 28f774c

Please sign in to comment.