43718: Use singular completion group descriptions

This commit is contained in:
dana 2018-10-24 00:41:58 -05:00
parent f413e5e17f
commit da05d2cc2b
13 changed files with 30 additions and 20 deletions

View file

@ -1,3 +1,13 @@
2018-10-24 dana <dana@dana.is>
* 43718: Completion/BSD/Command/_fstat,
Completion/Unix/Command/_awk, Completion/Unix/Command/_cat,
Completion/Unix/Command/_chown, Completion/Unix/Command/_df,
Completion/Unix/Command/_grep, Completion/Unix/Command/_ls,
Completion/Unix/Command/_od, Completion/Unix/Command/_pax,
Completion/Unix/Command/_rar, Completion/Unix/Command/_rm,
Completion/Unix/Command/_xxd: Use singular group descriptions
2018-10-23 Peter Stephenson <p.stephenson@samsung.com>
* Marcin Mielniczuk: 43714: Completion/Unix/Command/_lp: lp

View file

@ -9,4 +9,4 @@ _arguments -s \
'-p+[report all files open by the specified process]:process id:_pids' \
'-u+[report all files open by the specified user]:user:_users' \
'-v[verbose mode]' \
'*:files:_files'
'*: :_files'

View file

@ -21,7 +21,7 @@ args=(
'*'{-v+,--assign}'[assign values to variables]:assignment:'
'(1)*'{-f+,--file}'[read program file]:program file:->script'
'1: :_guard "^-*" "program text"'
'*:input files:_files'
'*:input file:_files'
)
case $variant in

View file

@ -16,7 +16,7 @@ if _pick_variant gnu=GNU unix --version; then
'(-v --show-nonprinting)'{-v,--show-nonprinting}'[use ^ and M- notation, except for LFD and TAB]'
'(- : *)--help[display help and exit]'
'(- : *)--version[output version information and exit]'
'*:files:_files'
'*: :_files'
)
elif [[ "$OSTYPE" == (*bsd|dragonfly|darwin)* ]]; then
@ -29,7 +29,7 @@ elif [[ "$OSTYPE" == (*bsd|dragonfly|darwin)* ]]; then
'(-v)-t[display tab as ^I (implies -v)]'
'-u[do not buffer output]'
'-v[display non-printing chars as ^X or M-a]'
'*:files:_files'
'*: :_files'
)
[[ $OSTYPE = (free|net)bsd* ]] && args+=(
'-l[set a lock on the stdout file descriptor]'
@ -48,14 +48,14 @@ elif [[ $OSTYPE = solaris* ]]; then
'-v[display non-printing chars as ^X or M-a]'
'-e[display $ at the end of each line (requires -v)]'
'-t[display tab as ^I and formfeeds and ^L (requires -v)]'
'*:files:_files'
'*: :_files'
)
else
# POSIX reqires '-u', and most OSes may support '-n'
args=(
'-n[number all output lines]'
'-u[do not buffer output]'
'*:files:_files'
'*: :_files'
)
fi

View file

@ -40,7 +40,7 @@ else
fi
(( $+words[(r)--reference*] )) || args+=( '(--reference)1: :->owner' )
_arguments -C -s "$args[@]" '*:files:->files' && ret=0
_arguments -C -s "$args[@]" '*: :->files' && ret=0
case $state in
owner)

View file

@ -19,7 +19,7 @@ if _pick_variant gnu=GNU unix --version; then
'!-v'
'(- : *)--help[display help and exit]'
'(- : *)--version[output version information and exit]'
'*:files:_umountable'
'*: :_umountable'
- '(format)'
{-B+,--block-size=}'[specify block size]:size (bytes)'
'-k[like --block-size=1K]'
@ -36,7 +36,7 @@ elif [[ "$OSTYPE" == (darwin|dragonfly|freebsd|netbsd*|openbsd)* ]]; then
'(-G -i -P)-i[include inode usage statistics (default)]'
'-l[only display locally-mounted file systems]'
'-n[use previously obtained statistics]'
'*:files:_umountable'
'*: :_umountable'
)
spec='[only display file systems of specified types]:file system type:->fslist'
case "$OSTYPE" in
@ -93,7 +93,7 @@ else
'-k[use 1024-byte blocks]'
'-P[POSIX compliant output]'
'-t[include total allocated-space figures in the output]'
'*:files:_umountable'
'*: :_umountable'
)
fi

View file

@ -10,11 +10,11 @@ if [[ $service = *GREP_OPT* ]]; then
else
arguments=( '(-e --regexp -f --file)1: :_guard "^-*" pattern' )
if [[ $service = z* ]]; then
arguments+=( '*:files:_files -g "*.gz(-.)"' )
arguments+=( '*: :_files -g "*.gz(-.)"' )
elif [[ $service = bz* ]]; then
arguments+=( '*:files:_files -g "*.bz2(-.)"' )
arguments+=( '*: :_files -g "*.bz2(-.)"' )
else
arguments+=( '*:files:_files' )
arguments+=( '*: :_files' )
fi
command="$words[1]"
fi

View file

@ -37,7 +37,7 @@ if ! _pick_variant gnu=gnu unix --help; then
'(-B -b -w -q)-q[hide control chars]'
'*:files:_files'
'*: :_files'
)
if [[ "$OSTYPE" = (netbsd*|dragonfly*|freebsd*|openbsd*|darwin*) ]]; then
arguments+=(

View file

@ -61,7 +61,7 @@ else
esac
fi
_arguments -C -s -S : "$args[@]" '*:files:_files' && return 0
_arguments -C -s -S : "$args[@]" '*: :_files' && return 0
case "$state" in
(format)

View file

@ -44,4 +44,4 @@ _arguments -s \
'-X[do not descend into directories that have a different device ID]' \
'-Y[ignore older files by ctime after file name mods]' \
'-Z[ignore older files after file name mods]' \
'*:files:_files'
'*: :_files'

View file

@ -58,7 +58,7 @@ case $service in
'-n+:file to include:_files' \
'-n@+:file of files to include:_files' \
"$common[@]" \
'*:RAR files:_files -g \*.rar\(-.\)'
'*:RAR file:_files -g \*.rar\(-.\)'
fi
;;
rar)
@ -126,7 +126,7 @@ case $service in
'-w+[assign work directory]:work directory:_files -/' \
"$common[@]" \
'-z+[read archive comment from file]:comment file:_files' \
'*:files:_files'
'*: :_files'
fi
;;
esac

View file

@ -5,7 +5,7 @@ args=(
'(-f --force)'{-f,--force}'[ignore nonexistent files, never prompt]'
'(-I --interactive)-i[prompt before every removal]'
'(-r -R --recursive)'{-r,-R,--recursive}'[remove directories and their contents recursively]'
'*::files:->file'
'*:: :->file'
)
if _pick_variant gnu=gnu unix --help; then
opts+=(-S)

View file

@ -41,7 +41,7 @@ arguments=(
{-o+,-offset}'[add specified offset to displayed file position]:offset'
{-s,-skip,-seek}'[specify file offset to dump from]: :_guard "[0-9]#" "file offset to dump from (absolute or relative)"'
':files:_files'
': :_files'
)
_arguments -S $arguments