Coding style tweaks.

This commit is contained in:
Ville Skyttä 2010-10-24 12:37:22 +03:00
parent 1b13f96ff5
commit cf882a49e2
7 changed files with 35 additions and 36 deletions

View File

@ -27,7 +27,8 @@ _mock()
_split_longopt && split=true
case $prev in
-h|--help|--copyin|--copyout|--arch|-D|--define|--with|--without|--uniqueext|--rpmbuild_timeout|--sources|--cwd)
-h|--help|--copyin|--copyout|--arch|-D|--define|--with|--without|\
--uniqueext|--rpmbuild_timeout|--sources|--cwd)
return 0
;;
-r|--root)
@ -62,15 +63,13 @@ _mock()
$split && return 0
if [[ "$cur" == -* ]] ; then
COMPREPLY=( $( compgen -W '--version --help --rebuild \
--buildsrpm --shell --chroot --clean --init \
--installdeps --install --update --orphanskill \
--copyin --copyout --root --offline --no-clean \
--cleanup-after --no-cleanup-after --arch --target \
--define --with --without --resultdir --uniqueext \
--configdir --rpmbuild_timeout --unpriv --cwd --spec \
--sources --verbose --quiet --trace --enable-plugin \
--disable-plugin --print-root-path' -- "$cur" ) )
COMPREPLY=( $( compgen -W '--version --help --rebuild --buildsrpm
--shell --chroot --clean --init --installdeps --install --update
--orphanskill --copyin --copyout --root --offline --no-clean
--cleanup-after --no-cleanup-after --arch --target --define --with
--without --resultdir --uniqueext --configdir --rpmbuild_timeout
--unpriv --cwd --spec --sources --verbose --quiet --trace
--enable-plugin --disable-plugin --print-root-path' -- "$cur" ) )
else
_filedir '@(?(no)src.r|s)pm'
fi

View File

@ -9,24 +9,24 @@ _dd()
_get_comp_words_by_ref -n = cur
case $cur in
if=*|of=*)
cur=${cur#*=}
_filedir
return 0
;;
conv=*)
cur=${cur#*=}
COMPREPLY=( $( compgen -W 'ascii ebcdic ibm block unblock \
lcase notrunc ucase swab noerror sync' -- "$cur" ) )
return 0
;;
if=*|of=*)
cur=${cur#*=}
_filedir
return 0
;;
conv=*)
cur=${cur#*=}
COMPREPLY=( $( compgen -W 'ascii ebcdic ibm block unblock lcase
notrunc ucase swab noerror sync' -- "$cur" ) )
return 0
;;
esac
_expand || return 0
COMPREPLY=( $( compgen -W '--help --version' -- "$cur" ) \
$( compgen -W 'bs cbs conv count ibs if obs of seek skip'\
-S '=' -- "$cur" ) )
$( compgen -W 'bs cbs conv count ibs if obs of seek skip' \
-S '=' -- "$cur" ) )
} &&
complete -F _dd -o nospace -o filenames dd

View File

@ -27,7 +27,6 @@ _dselect()
remove quit' -- "$cur" ) )
fi
return 0
} &&
complete -F _dselect -o filenames dselect

View File

@ -51,13 +51,13 @@ _postmap()
esac
if [[ $cur == -* ]]; then
COMPREPLY=( $( compgen -W '-N -f -i -n -o -p -r -v -w -c -d -q'\
COMPREPLY=( $( compgen -W '-N -f -i -n -o -p -r -v -w -c -d -q' \
-- "$cur" ) )
return 0
fi
if [[ "$cur" == *:* ]]; then
COMPREPLY=( $( compgen -f -- "${cur#*:}" ) )
COMPREPLY=( $( compgen -f -- "${cur#*:}" ) )
else
len=${#cur}
idx=0
@ -143,7 +143,7 @@ _postconf()
esac
if [[ $cur == -* ]]; then
COMPREPLY=( $( compgen -W '-A -a -b -c -d -e -h -m -l -n -t -v'\
COMPREPLY=( $( compgen -W '-A -a -b -c -d -e -h -m -l -n -t -v' \
-- "$cur" ) )
return 0
fi

View File

@ -43,8 +43,6 @@ _python()
-U -v -V -W -x -c" -- "$cur" ) )
fi
return 0
} &&
complete -F _python -o filenames python

View File

@ -11,11 +11,11 @@ _sbcl()
# completing an option (may or may not be separated by a space)
if [[ "$cur" == -* ]]; then
COMPREPLY=( $( compgen -W '--core --noinform --help --version \
--sysinit --userinit --eval --noprint --disable-debugger \
--end-runtime-options --end-toplevel-options ' -- "$cur" ) )
COMPREPLY=( $( compgen -W '--core --noinform --help --version
--sysinit --userinit --eval --noprint --disable-debugger
--end-runtime-options --end-toplevel-options ' -- "$cur" ) )
else
_filedir
_filedir
fi
return 0

View File

@ -14,7 +14,8 @@ _useradd()
# with -u/--uid
case $prev in
-c|--comment|-h|--help|-e|--expiredate|-f|--inactive|-k|--key|-p|--password|-u|--uid|-Z|--selinux-user)
-c|--comment|-h|--help|-e|--expiredate|-f|--inactive|-k|--key|\
-p|--password|-u|--uid|-Z|--selinux-user)
return 0
;;
-b|--base-dir|-d|--home|-k|--skel)
@ -64,7 +65,8 @@ _usermod()
# with -u/--uid
case $prev in
-c|--comment|-d|--home|-e|--expiredate|-f|--inactive|-h|--help|-l|--login|-p|--password|-u|--uid|-Z|--selinux-user)
-c|--comment|-d|--home|-e|--expiredate|-f|--inactive|-h|--help|\
-l|--login|-p|--password|-u|--uid|-Z|--selinux-user)
return 0
;;
-g|--gid)
@ -126,7 +128,8 @@ _chage()
_split_longopt && split=true
case $prev in
-d|--lastday|-E|--expiredate|-h|--help|-I|--inactive|-m|--mindays|-M|--maxdays|-W|--warndays)
-d|--lastday|-E|--expiredate|-h|--help|-I|--inactive|-m|--mindays|\
-M|--maxdays|-W|--warndays)
return 0
;;
esac