Replace some uses of ls with printf.
This commit is contained in:
parent
40a83563fd
commit
c755d7becc
@ -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
|
||||
|
@ -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" ) )
|
||||
;;
|
||||
|
@ -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
|
||||
|
Loading…
x
Reference in New Issue
Block a user