[Bash-completion-commits] [SCM] bash-completion branch, master, updated. 6807b5e72d94cded3f4a80524c983cc375548944

Ville Skyttä ville.skytta at iki.fi
Sun Dec 20 22:09:15 UTC 2009


The following commit has been merged in the master branch:
commit c755d7becc9b73f7ab9911c8b624e17171bf7e5f
Author: Ville Skyttä <ville.skytta at iki.fi>
Date:   Sun Dec 20 23:44:33 2009 +0200

    Replace some uses of ls with printf.

diff --git a/bash_completion b/bash_completion
index f33f85a..9c3e086 100644
--- a/bash_completion
+++ b/bash_completion
@@ -470,7 +470,7 @@ _configured_interfaces()
             /etc/network/interfaces )" -- "$cur" ) )
     elif [ -f /etc/SuSE-release ]; then
         # SuSE system
-        COMPREPLY=( $( compgen -W "$( command ls \
+        COMPREPLY=( $( compgen -W "$( printf '%s\n' \
             /etc/sysconfig/network/ifcfg-* | \
             sed -ne 's|.*ifcfg-\(.*\)|\1|p' )" -- "$cur" ) )
     elif [ -f /etc/pld-release ]; then
@@ -480,7 +480,7 @@ _configured_interfaces()
             sed -ne 's|.*ifcfg-\(.*\)|\1|p' )" -- "$cur" ) )
     else
         # Assume Red Hat
-        COMPREPLY=( $( compgen -W "$( command ls \
+        COMPREPLY=( $( compgen -W "$( printf '%s\n' \
             /etc/sysconfig/network-scripts/ifcfg-* | \
             sed -ne 's|.*ifcfg-\(.*\)|\1|p' )" -- "$cur" ) )
     fi
diff --git a/contrib/bluez b/contrib/bluez
index 270effc..c0b70bc 100644
--- a/contrib/bluez
+++ b/contrib/bluez
@@ -384,7 +384,7 @@ _hciattach()
         _count_args
         case $args in
             1)
-                COMPREPLY=( $( command ls /dev/tty* ) )
+                COMPREPLY=( $( printf '%s\n' /dev/tty* ) )
                 COMPREPLY=( $( compgen -W '${COMPREPLY[@]} \
                     ${COMPREPLY[@]#/dev/}' -- "$cur" ) )
                 ;;
diff --git a/contrib/minicom b/contrib/minicom
index 199ac0e..b2ffcb0 100644
--- a/contrib/minicom
+++ b/contrib/minicom
@@ -19,7 +19,7 @@ _minicom()
             return 0
             ;;
         -P)
-            COMPREPLY=( $( command ls /dev/tty* ) )
+            COMPREPLY=( $( printf '%s\n' /dev/tty* ) )
             COMPREPLY=( $( compgen -W '${COMPREPLY[@]} ${COMPREPLY[@]#/dev/}' \
                 -- "$cur" ) )
             return 0
@@ -37,7 +37,7 @@ _minicom()
         [ -n "$( command ls /etc/minicom/minirc.* 2>/dev/null)" ] \
             && confdir=/etc/minicom
         if [ -n "$confdir" ]; then
-            COMPREPLY=( $( compgen -W '$( command ls $confdir/minirc.* | \
+            COMPREPLY=( $( compgen -W '$( printf "%s\n" $confdir/minirc.* | \
                 sed -e "s|$confdir/minirc.||")' -- "$cur" ) )
             return 0
         fi

-- 
bash-completion



More information about the Bash-completion-commits mailing list