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

index 2d6fd29312827c80aa9adc3be3909a873f8e3945..891b57a4e73f3430c0778ad920241244f7ea0d28 100644 (file)
@@ -25,6 +25,7 @@ _keyringer() {
   elif [ "${#COMP_WORDS[@]}" == "4" ]; then
     # Process config
     source $config/config
+    path="`eval echo '$'$instance`"
 
     case "${prev}" in
       options|preferences)
@@ -35,7 +36,11 @@ _keyringer() {
         ;;
       ls)
         # TODO
-        opts="`keyringer $instance ls ${cur}`"
+        if [ -z "${curl}" ]; then
+          opts="`keyringer $instance ls`"
+        else
+          opts="`keyringer $instance ls ${cur}*`"
+        fi
         ;;
       *)
         ;;