]> gitweb.fluxo.info Git - keyringer.git/commitdiff
Use 'ls --color=never' on shell completions
authorSilvio Rhatto <rhatto@riseup.net>
Fri, 27 Sep 2013 22:06:35 +0000 (19:06 -0300)
committerSilvio Rhatto <rhatto@riseup.net>
Fri, 27 Sep 2013 22:06:35 +0000 (19:06 -0300)
lib/keyringer/completions/bash/keyringer
lib/keyringer/completions/zsh/_keyringer

index e33977aba40eda0986156acae3a44a99e923a5c8..3d519c999ae982293fdb98820d8e1a4333031950 100644 (file)
@@ -53,7 +53,7 @@ _keyringer() {
   # Process config
   source $config/config
   path="`eval echo '$'$instance`"
-  keyrings="`ls $config | sed -e 's/config//'`"
+  keyrings="`ls --color=never $config | sed -e 's/config//'`"
 
   # Available instances
   instances="`echo $keyrings | sed -e 's/ /|/'`"
@@ -89,7 +89,7 @@ _keyringer() {
   elif [ "${#COMP_WORDS[@]}" == "5" ]; then
     case "${command}" in
       recipients)
-        opts="$(cd $path/config/recipients && ls -p ${cur}* 2> /dev/null)"
+        opts="$(cd $path/config/recipients && ls --color=never -p ${cur}* 2> /dev/null)"
         ;;
       genpair)
         opts="$(bash -c "set -f && keyringer $instance ls -p -d ${cur}*" 2> /dev/null)"
index c8ada9b9dee07bf14f0c600bb2f6454743f9c353..60596970d8adcdbb19399e97988a009553f2011c 100644 (file)
@@ -19,7 +19,7 @@ _keyringer() {
     fi
 
     # Process config
-    local keyrings="`ls $config | sed -e 's/config//'`"
+    local keyrings="`ls --color=never $config | sed -e 's/config//'`"
     source $config/config
     keyring_path="`eval echo '$'$words[2]`"
 
@@ -62,7 +62,7 @@ _keyringer() {
       misc)
         case "$words[3]" in
           recipients)
-            compadd "$@" $(cd $keyring_path/config/recipients && ls -p $words[5]* 2> /dev/null)
+            compadd "$@" $(cd $keyring_path/config/recipients && ls --color=never -p $words[5]* 2> /dev/null)
             ;;
           genpair)
             # TODO: do not rely on bash