diff --git a/bash_completion b/bash_completion index f33f85a9..9c3e086a 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 270effc6..c0b70bc6 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 199ac0e9..b2ffcb07 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