Indentation/linewrap fixes.
This commit is contained in:
parent
41c675e749
commit
db7d2833df
@ -451,11 +451,8 @@ _split_longopt()
|
|||||||
_parse_help() {
|
_parse_help() {
|
||||||
local cmd
|
local cmd
|
||||||
cmd=$1
|
cmd=$1
|
||||||
$cmd --help | \
|
$cmd --help | grep -- "^[[:space:]]*-" | tr "," " " | \
|
||||||
grep -- "^[[:space:]]*-" | \
|
awk '{print $1; if ($2 ~ /-.*/) { print $2 } }' | sed -e "s:=.*::g"
|
||||||
tr "," " " | \
|
|
||||||
awk '{print $1; if ($2 ~ /-.*/) { print $2 } }' | \
|
|
||||||
sed -e "s:=.*::g"
|
|
||||||
}
|
}
|
||||||
|
|
||||||
# This function completes on signal names
|
# This function completes on signal names
|
||||||
@ -579,9 +576,7 @@ _pgids()
|
|||||||
_pnames()
|
_pnames()
|
||||||
{
|
{
|
||||||
COMPREPLY=( $( compgen -W '$( command ps -efo comm | \
|
COMPREPLY=( $( compgen -W '$( command ps -efo comm | \
|
||||||
sed -e 1d -e "s:.*/::" -e "s/^-//" \
|
sed -e 1d -e "s:.*/::" -e "s/^-//" -e "s/^<defunct>$//")' -- "$cur" ) )
|
||||||
-e "s/^<defunct>$//")' \
|
|
||||||
-- "$cur" ) )
|
|
||||||
} ||
|
} ||
|
||||||
_pnames()
|
_pnames()
|
||||||
{
|
{
|
||||||
@ -594,10 +589,8 @@ _pnames()
|
|||||||
# Not using "ps axo comm" because under some Linux kernels, it
|
# Not using "ps axo comm" because under some Linux kernels, it
|
||||||
# truncates command names (see e.g. http://bugs.debian.org/497540#19)
|
# truncates command names (see e.g. http://bugs.debian.org/497540#19)
|
||||||
COMPREPLY=( $( compgen -W '$( command ps axo command= | \
|
COMPREPLY=( $( compgen -W '$( command ps axo command= | \
|
||||||
sed -e "s/ .*//" -e "s:.*/::" -e "s/:$//" \
|
sed -e "s/ .*//" -e "s:.*/::" -e "s/:$//" -e "s/^[[(-]//" \
|
||||||
-e "s/^[[(-]//" -e "s/[])]$//" \
|
-e "s/[])]$//" -e "s/^<defunct>$//")' -- "$cur" ) )
|
||||||
-e "s/^<defunct>$//")' \
|
|
||||||
-- "$cur" ) )
|
|
||||||
}
|
}
|
||||||
|
|
||||||
# This function completes on user IDs
|
# This function completes on user IDs
|
||||||
@ -737,9 +730,9 @@ _usb_ids()
|
|||||||
# start of section containing completion functions for external programs
|
# start of section containing completion functions for external programs
|
||||||
|
|
||||||
# a little help for FreeBSD ports users
|
# a little help for FreeBSD ports users
|
||||||
[ $UNAME = FreeBSD ] && complete -W 'index search fetch fetch-list \
|
[ $UNAME = FreeBSD ] && complete -W 'index search fetch fetch-list extract \
|
||||||
extract patch configure build install reinstall \
|
patch configure build install reinstall deinstall clean clean-depends \
|
||||||
deinstall clean clean-depends kernel buildworld' make
|
kernel buildworld' make
|
||||||
|
|
||||||
# This completes on a list of all available service scripts for the
|
# This completes on a list of all available service scripts for the
|
||||||
# 'service' command and/or the SysV init.d directory, followed by
|
# 'service' command and/or the SysV init.d directory, followed by
|
||||||
@ -761,8 +754,7 @@ _service()
|
|||||||
# don't complete past 2nd token
|
# don't complete past 2nd token
|
||||||
[ $COMP_CWORD -gt 2 ] && return 0
|
[ $COMP_CWORD -gt 2 ] && return 0
|
||||||
|
|
||||||
[ -d /etc/rc.d/init.d ] && sysvdir=/etc/rc.d/init.d \
|
[ -d /etc/rc.d/init.d ] && sysvdir=/etc/rc.d/init.d || sysvdir=/etc/init.d
|
||||||
|| sysvdir=/etc/init.d
|
|
||||||
|
|
||||||
if [[ $COMP_CWORD -eq 1 ]] && [[ $prev == "service" ]]; then
|
if [[ $COMP_CWORD -eq 1 ]] && [[ $prev == "service" ]]; then
|
||||||
_services
|
_services
|
||||||
@ -776,7 +768,7 @@ _service()
|
|||||||
} &&
|
} &&
|
||||||
complete -F _service service
|
complete -F _service service
|
||||||
[ -d /etc/init.d/ ] && complete -F _service -o default \
|
[ -d /etc/init.d/ ] && complete -F _service -o default \
|
||||||
$(for i in /etc/init.d/*; do echo ${i##*/}; done)
|
$(for i in /etc/init.d/*; do echo ${i##*/}; done)
|
||||||
|
|
||||||
|
|
||||||
# chown(1) completion
|
# chown(1) completion
|
||||||
@ -804,9 +796,9 @@ _chown()
|
|||||||
|
|
||||||
# options completion
|
# options completion
|
||||||
if [[ "$cur" == -* ]]; then
|
if [[ "$cur" == -* ]]; then
|
||||||
COMPREPLY=( $( compgen -W '-c -h -f -R -v --changes \
|
COMPREPLY=( $( compgen -W '-c -h -f -R -v --changes --dereference \
|
||||||
--dereference --no-dereference --from --silent --quiet \
|
--no-dereference --from --silent --quiet --reference --recursive \
|
||||||
--reference --recursive --verbose --help --version' -- "$cur" ) )
|
--verbose --help --version' -- "$cur" ) )
|
||||||
else
|
else
|
||||||
_count_args
|
_count_args
|
||||||
|
|
||||||
@ -845,9 +837,9 @@ _chgrp()
|
|||||||
|
|
||||||
# options completion
|
# options completion
|
||||||
if [[ "$cur" == -* ]]; then
|
if [[ "$cur" == -* ]]; then
|
||||||
COMPREPLY=( $( compgen -W '-c -h -f -R -v --changes \
|
COMPREPLY=( $( compgen -W '-c -h -f -R -v --changes --dereference \
|
||||||
--dereference --no-dereference --silent --quiet \
|
--no-dereference --silent --quiet --reference --recursive \
|
||||||
--reference --recursive --verbose --help --version' -- "$cur" ) )
|
--verbose --help --version' -- "$cur" ) )
|
||||||
return 0
|
return 0
|
||||||
fi
|
fi
|
||||||
|
|
||||||
@ -1113,10 +1105,9 @@ _ipsec()
|
|||||||
|
|
||||||
|
|
||||||
if [ $COMP_CWORD -eq 1 ]; then
|
if [ $COMP_CWORD -eq 1 ]; then
|
||||||
COMPREPLY=( $( compgen -W 'auto barf eroute klipsdebug look \
|
COMPREPLY=( $( compgen -W 'auto barf eroute klipsdebug look manual \
|
||||||
manual pluto ranbits rsasigkey \
|
pluto ranbits rsasigkey setup showdefaults showhostkey spi spigrp \
|
||||||
setup showdefaults showhostkey spi \
|
tncfg whack' -- "$cur" ) )
|
||||||
spigrp tncfg whack' -- "$cur" ) )
|
|
||||||
return 0
|
return 0
|
||||||
fi
|
fi
|
||||||
|
|
||||||
@ -1345,8 +1336,9 @@ _known_hosts_real()
|
|||||||
|
|
||||||
return 0
|
return 0
|
||||||
} # _known_hosts_real()
|
} # _known_hosts_real()
|
||||||
complete -F _known_hosts traceroute traceroute6 tracepath tracepath6 \
|
complete -F _known_hosts traceroute traceroute6 tracepath tracepath6 ping \
|
||||||
ping ping6 fping fping6 telnet host nslookup rsh rlogin ftp dig ssh-installkeys mtr
|
ping6 fping fping6 telnet host nslookup rsh rlogin ftp dig mtr \
|
||||||
|
ssh-installkeys
|
||||||
|
|
||||||
# This meta-cd function observes the CDPATH variable, so that cd additionally
|
# This meta-cd function observes the CDPATH variable, so that cd additionally
|
||||||
# completes on directories under those specified in CDPATH.
|
# completes on directories under those specified in CDPATH.
|
||||||
|
Loading…
x
Reference in New Issue
Block a user