]> gitweb.fluxo.info Git - keyringer.git/commitdiff
Avoiding duplication on git completion 0.2.1
authorSilvio Rhatto <rhatto@riseup.net>
Fri, 2 Aug 2013 22:09:13 +0000 (19:09 -0300)
committerSilvio Rhatto <rhatto@riseup.net>
Fri, 2 Aug 2013 22:09:13 +0000 (19:09 -0300)
lib/keyringer/completions/bash

index 247b7ff234f4fc029d918784aae571b87293947f..a8fce92e934fc57e5b8f81263f3a84024924c143 100644 (file)
@@ -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