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" ) )
|
/etc/network/interfaces )" -- "$cur" ) )
|
||||||
elif [ -f /etc/SuSE-release ]; then
|
elif [ -f /etc/SuSE-release ]; then
|
||||||
# SuSE system
|
# SuSE system
|
||||||
COMPREPLY=( $( compgen -W "$( command ls \
|
COMPREPLY=( $( compgen -W "$( printf '%s\n' \
|
||||||
/etc/sysconfig/network/ifcfg-* | \
|
/etc/sysconfig/network/ifcfg-* | \
|
||||||
sed -ne 's|.*ifcfg-\(.*\)|\1|p' )" -- "$cur" ) )
|
sed -ne 's|.*ifcfg-\(.*\)|\1|p' )" -- "$cur" ) )
|
||||||
elif [ -f /etc/pld-release ]; then
|
elif [ -f /etc/pld-release ]; then
|
||||||
@ -480,7 +480,7 @@ _configured_interfaces()
|
|||||||
sed -ne 's|.*ifcfg-\(.*\)|\1|p' )" -- "$cur" ) )
|
sed -ne 's|.*ifcfg-\(.*\)|\1|p' )" -- "$cur" ) )
|
||||||
else
|
else
|
||||||
# Assume Red Hat
|
# Assume Red Hat
|
||||||
COMPREPLY=( $( compgen -W "$( command ls \
|
COMPREPLY=( $( compgen -W "$( printf '%s\n' \
|
||||||
/etc/sysconfig/network-scripts/ifcfg-* | \
|
/etc/sysconfig/network-scripts/ifcfg-* | \
|
||||||
sed -ne 's|.*ifcfg-\(.*\)|\1|p' )" -- "$cur" ) )
|
sed -ne 's|.*ifcfg-\(.*\)|\1|p' )" -- "$cur" ) )
|
||||||
fi
|
fi
|
||||||
|
@ -384,7 +384,7 @@ _hciattach()
|
|||||||
_count_args
|
_count_args
|
||||||
case $args in
|
case $args in
|
||||||
1)
|
1)
|
||||||
COMPREPLY=( $( command ls /dev/tty* ) )
|
COMPREPLY=( $( printf '%s\n' /dev/tty* ) )
|
||||||
COMPREPLY=( $( compgen -W '${COMPREPLY[@]} \
|
COMPREPLY=( $( compgen -W '${COMPREPLY[@]} \
|
||||||
${COMPREPLY[@]#/dev/}' -- "$cur" ) )
|
${COMPREPLY[@]#/dev/}' -- "$cur" ) )
|
||||||
;;
|
;;
|
||||||
|
@ -19,7 +19,7 @@ _minicom()
|
|||||||
return 0
|
return 0
|
||||||
;;
|
;;
|
||||||
-P)
|
-P)
|
||||||
COMPREPLY=( $( command ls /dev/tty* ) )
|
COMPREPLY=( $( printf '%s\n' /dev/tty* ) )
|
||||||
COMPREPLY=( $( compgen -W '${COMPREPLY[@]} ${COMPREPLY[@]#/dev/}' \
|
COMPREPLY=( $( compgen -W '${COMPREPLY[@]} ${COMPREPLY[@]#/dev/}' \
|
||||||
-- "$cur" ) )
|
-- "$cur" ) )
|
||||||
return 0
|
return 0
|
||||||
@ -37,7 +37,7 @@ _minicom()
|
|||||||
[ -n "$( command ls /etc/minicom/minirc.* 2>/dev/null)" ] \
|
[ -n "$( command ls /etc/minicom/minirc.* 2>/dev/null)" ] \
|
||||||
&& confdir=/etc/minicom
|
&& confdir=/etc/minicom
|
||||||
if [ -n "$confdir" ]; then
|
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" ) )
|
sed -e "s|$confdir/minirc.||")' -- "$cur" ) )
|
||||||
return 0
|
return 0
|
||||||
fi
|
fi
|
||||||
|
Loading…
x
Reference in New Issue
Block a user