1
0
Fork 0
mirror of git://git.code.sf.net/p/zsh/code synced 2025-09-11 13:01:28 +02:00

42171: prevent parameters of various parameters from becoming global

This commit is contained in:
Eric Cook 2017-12-25 21:15:24 -05:00
parent 3c24adb2ed
commit 99cf61fd42
19 changed files with 41 additions and 17 deletions

View file

@ -1,3 +1,25 @@
2017-01-02 Eric Cook <llua@gmx.com>
* 42171: Completion/BSD/Command/_portsnap,
Completion/Linux/Command/_ipset,
Completion/Linux/Command/_valgrind,
Completion/Redhat/Command/_rpm,
Completion/Solaris/Command/_prstat,
Completion/Unix/Command/_arp,
Completion/Unix/Command/_cvs,
Completion/Unix/Command/_devtodo,
Completion/Unix/Command/_ffmpeg,
Completion/Unix/Command/_git,
Completion/Unix/Command/_gpg,
Completion/Unix/Command/_ruby,
Completion/Unix/Command/_tr,
Completion/Unix/Command/_whois,
Completion/Unix/Command/_yp,
Completion/Unix/Command/_zfs,
Completion/X/Command/_xset,
Completion/Zsh/Command/_cd: prevent various parmeters
from becoming global.
2017-12-31 Jun-ichi Takimoto <takimoto-j@kba.biglobe.ne.jp> 2017-12-31 Jun-ichi Takimoto <takimoto-j@kba.biglobe.ne.jp>
* 42183: Completion/Unix/Command/_objdump: support LLVM variant * 42183: Completion/Unix/Command/_objdump: support LLVM variant

View file

@ -1,6 +1,6 @@
#compdef portsnap #compdef portsnap
local curcontext="$curcontext" state line local curcontext="$curcontext" state line flags
typeset -A opt_args typeset -A opt_args
flags=( flags=(

View file

@ -1,7 +1,7 @@
#compdef ipset #compdef ipset
local offset=0 local offset=0
local -a args from_to hash cmds listopts local -a args from_to hash cmds listopts addopts
_set_types () { _set_types () {
_values -S \ "Set type" \ _values -S \ "Set type" \

View file

@ -1,8 +1,8 @@
#compdef valgrind -value-,VALGRIND_OPTS,-default- #compdef valgrind -value-,VALGRIND_OPTS,-default-
local curcontext="$curcontext" state line local curcontext="$curcontext" state line
local -a cmd common common_mem_null \ local -a cmd common common_{mem_null,read_varinfo}
args args_{addrcheck,memcheck,cachegrind,helgrind,lackey,massif,none} local -a args args_{addrcheck,memcheck,cachegrind,helgrind,lackey,massif,none}
cmd=( cmd=(
'1:command name:_command_names -e' '1:command name:_command_names -e'

View file

@ -45,7 +45,7 @@ _rpm () {
local curcontext="$curcontext" state lstate line nm="$compstate[nmatches]" local curcontext="$curcontext" state lstate line nm="$compstate[nmatches]"
typeset -A opt_args typeset -A opt_args
local ret=1 local ret=1
local -a tmp expl commonopts selectopts local -a tmp expl commonopts selectopts pathopts
commonopts=( commonopts=(
'(-v --verbose)--quiet[print as little as possible]' '(-v --verbose)--quiet[print as little as possible]'

View file

@ -2,6 +2,7 @@
_prstat() _prstat()
{ {
local d_opt sort_key
d_opt=( d_opt=(
"u"\:"seconds past the epoch" "u"\:"seconds past the epoch"
"d"\:"standard date format" "d"\:"standard date format"

View file

@ -2,7 +2,7 @@
local state line expl curcontext="$curcontext" ret=1 local state line expl curcontext="$curcontext" ret=1
typeset -A opt_args typeset -A opt_args
local -a cmds args local -a cmds args vopt flags
flags=( temp pub ) flags=( temp pub )
cmds=( cmds=(

View file

@ -882,7 +882,7 @@ _cvs_modified_entries() {
} }
(( $+_cvs_ignore_default )) || (( $+_cvs_ignore_default )) ||
_cvs_ignore_default=( local _cvs_ignore_default=(
RCS SCCS CVS CVS.adm RCSLOG 'cvslog.*' tags TAGS .make.state .nse_depinfo RCS SCCS CVS CVS.adm RCSLOG 'cvslog.*' tags TAGS .make.state .nse_depinfo
'*\~' '\#*' '.\#*' ',*' '_$*' '*$' '*.old' '*.bak' '*.BAK' '*.orig' '*.rej' '*\~' '\#*' '.\#*' ',*' '_$*' '*$' '*.old' '*.bak' '*.BAK' '*.orig' '*.rej'
'.del-*' '*.a' '*.olb' '*.o' '*.obj' '*.so' '*.exe' '*.Z' '*.elc' '*.ln' '.del-*' '*.a' '*.olb' '*.o' '*.obj' '*.so' '*.exe' '*.Z' '*.elc' '*.ln'

View file

@ -5,7 +5,7 @@ typeset -a arg_generic arg_add todo_opts \
priorities priorities
typeset -A arg_pair arg_desc typeset -A arg_pair arg_desc
typeset -i i typeset -i i
typeset expl typeset expl arg
for ((i=2; i <= $#words; i++)) { for ((i=2; i <= $#words; i++)) {
if [[ $words[$i] == '--database' ]]; then if [[ $words[$i] == '--database' ]]; then

View file

@ -100,7 +100,7 @@ typeset -A _ffmpeg_flags
local -a _ffmpeg_argspecs local -a _ffmpeg_argspecs
{ {
local lastopt local lastopt REPLY
local lastopt_description local lastopt_description
local lastopt_takesargs local lastopt_takesargs
local lastopt_type local lastopt_type

View file

@ -7727,7 +7727,7 @@ for file in ${^fpath}/_git-*~(*~|*.zwc)(-.N); do
continue continue
fi fi
local desc= local desc= input
integer i=1 integer i=1
while read input; do while read input; do
if (( i == 2 )); then if (( i == 2 )); then

View file

@ -1,7 +1,7 @@
#compdef gpg gpgv gpg-zip gpg2=gpg #compdef gpg gpgv gpg-zip gpg2=gpg
local curcontext="$curcontext" state line expl ret=1 local curcontext="$curcontext" state line expl ret=1
local -a args allopts dups local -a args allopts dups extra
typeset -A opt_args typeset -A opt_args
if [[ $service = gpg-zip ]]; then if [[ $service = gpg-zip ]]; then

View file

@ -2,7 +2,7 @@
local curcontext="$curcontext" state line expl desc RUBY ret=1 local curcontext="$curcontext" state line expl desc RUBY ret=1
typeset -A opt_args typeset -A opt_args
local -a opts irb all common charsets suf local -a opts irb erb all common charsets suf
all=( all=(
'*-r+[require the library before executing your script]:library name:->library' '*-r+[require the library before executing your script]:library name:->library'

View file

@ -1,7 +1,7 @@
#compdef tr #compdef tr
local curcontext="$curcontext" state line expl ret=1 local curcontext="$curcontext" state line expl ret=1
local args variant local args variant k
local -A descr local -A descr
descr=( descr=(
-c '[complement characters specified by first string]' -c '[complement characters specified by first string]'

View file

@ -1,6 +1,7 @@
#compdef whois fwhois #compdef whois fwhois
_whois () { _whois () {
local _whois_comp
_whois_setup _whois_setup
case "$0" in case "$0" in
fwhois) _whois_fwhois;; fwhois) _whois_fwhois;;

View file

@ -1,6 +1,6 @@
#compdef ypcat ypmatch yppasswd ypwhich ypset ypserv ypbind yppush yppoll ypxfr domainname #compdef ypcat ypmatch yppasswd ypwhich ypset ypserv ypbind yppush yppoll ypxfr domainname
local curcontext="$curcontext" line state expl ret=1 local curcontext="$curcontext" line state expl ret=1 _yp_cache_nicks _yp_args
typeset -A opt_args typeset -A opt_args
if (( ! $+_yp_cache_maps )); then if (( ! $+_yp_cache_maps )); then

View file

@ -6,7 +6,7 @@ _zfs() {
typeset -A opt_args typeset -A opt_args
local -a subcmds rw_properties rw_propnames ro_properties create_properties local -a subcmds rw_properties rw_propnames ro_properties create_properties
local -a share_nfs_ro_properties share_nfs_rw_properties local -a share_nfs_ro_properties share_nfs_rw_properties
local -a share_smb_ro_properties share_nfs_rw_properties local -a share_smb_ro_properties share_smb_rw_properties
local -a share_ro_properties share_rw_properties local -a share_ro_properties share_rw_properties
local -a difffields delegatable_perms local -a difffields delegatable_perms

View file

@ -111,7 +111,7 @@ _regex_arguments _xset_parse \
\) \# \) \#
_xset () { _xset () {
local expl allopts local expl allopts opt
typeset -A desc no eo typeset -A desc no eo
desc=( desc=(

View file

@ -22,7 +22,7 @@ _cd_options() {
setopt localoptions nonomatch setopt localoptions nonomatch
local expl ret=1 curarg local expl ret=1 curarg
integer argstart=2 noopts integer argstart=2 noopts match mbegin mend
if (( CURRENT > 1 )); then if (( CURRENT > 1 )); then
# if not in command position, may have options. # if not in command position, may have options.