From 487b7296c6a2a846f861523254dd0bb26383bf5a Mon Sep 17 00:00:00 2001 From: Eivind Uggedal Date: Thu, 18 Sep 2014 19:45:58 +0000 Subject: [PATCH] data/xbps.bash: use installed packages in non-repo query completion. --- data/xbps.bash | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/data/xbps.bash b/data/xbps.bash index 4dd03163..08248894 100644 --- a/data/xbps.bash +++ b/data/xbps.bash @@ -102,7 +102,14 @@ _xbps_complete() { return fi if [[ $prev != -@($morecommon|o|-ownedby) ]]; then - _xbps_all_reply $cur + local w + for w in "${words[@]}"; do + if [[ "$w" == -@(R|-repository) ]]; then + _xbps_all_reply $cur + return + fi + done + _xbps_installed_reply $cur return fi ;;