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

index 891b57a4e73f3430c0778ad920241244f7ea0d28..403bb114b7ecaa4eaac1e3e2969e6487b680d003 100644 (file)
@@ -36,10 +36,13 @@ _keyringer() {
         ;;
       ls)
         # TODO
-        if [ -z "${curl}" ]; then
-          opts="`keyringer $instance ls`"
+        if [ -z "${cur}" ]; then
+          # List folders with leading slash and remove @ symlink indicator
+          #opts="`ls --file-type -1 $path/keys | sed -e 's/@$//'`"
+          opts="`keyringer $instance ls --file-type -1 | sed -e 's/@$//'`"
         else
-          opts="`keyringer $instance ls ${cur}*`"
+          #opts="`ls --file-type -1 -d $path/keys/${cur}* | sed -e 's/@$//'`"
+          opts="`keyringer $instance ls --file-type -1 -d ${cur}* | sed -e 's/@$//'`"
         fi
         ;;
       *)