]> gitweb.fluxo.info Git - keyringer.git/commitdiff
Cleaning up ls completion
authorSilvio Rhatto <rhatto@riseup.net>
Thu, 18 Jul 2013 17:59:24 +0000 (14:59 -0300)
committerSilvio Rhatto <rhatto@riseup.net>
Thu, 18 Jul 2013 17:59:24 +0000 (14:59 -0300)
lib/keyringer/completions/bash

index 5b2f71db7a948e396f71d11e02976e5cb5bb74f4..c91a8ef3dfe6b2cf10e7c311c7418d0e23f5c5ba 100644 (file)
@@ -41,15 +41,6 @@ _keyringer() {
         else
           local append
           opts="`keyringer $instance ls -p -d ${cur}* 2> /dev/null`"
-
-          # Append the contents of each folder, one level down
-          for opt in $opts; do
-            if echo $opt | grep -qe '/$'; then
-              append="$append `keyringer $instance ls -d $opt* 2> /dev/null`"
-            fi
-          done
-
-          #opts="$opts $append"
         fi
         ;;
       *)
@@ -59,6 +50,7 @@ _keyringer() {
 
   # Return the available options
   COMPREPLY=( $(compgen -W "${opts}" -- ${cur}) )
+  [[ $COMPREPLY == */ ]] && compopt -o nospace
   return 0
 }