aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSilvio Rhatto <rhatto@riseup.net>2013-08-02 19:09:13 -0300
committerSilvio Rhatto <rhatto@riseup.net>2013-08-02 19:09:13 -0300
commit3cf730cd3301b476ef256a88db83b8025b03ded5 (patch)
tree1eb8a3af0081f86778c5e24e9af9e10f239c8add
parentdbad98bef1d7bd9d0178a481ededaa86be7176e4 (diff)
downloadkeyringer-3cf730cd3301b476ef256a88db83b8025b03ded5.tar.gz
keyringer-3cf730cd3301b476ef256a88db83b8025b03ded5.tar.bz2
Avoiding duplication on git completion0.2.1
-rw-r--r--lib/keyringer/completions/bash8
1 files changed, 8 insertions, 0 deletions
diff --git a/lib/keyringer/completions/bash b/lib/keyringer/completions/bash
index 247b7ff..a8fce92 100644
--- a/lib/keyringer/completions/bash
+++ b/lib/keyringer/completions/bash
@@ -16,6 +16,14 @@ _keyringer_git_complete() {
fi
_git
+
+ LAST=${COMP_WORDS[COMP_CWORD]}
+ REPLY=${COMPREPLY[@]}
+
+ if [ "$REPLY" == "$LAST" ]; then
+ return
+ fi
+
echo ${COMPREPLY[@]}
)
fi