From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 9144 invoked by alias); 26 Dec 2017 02:23:06 -0000 Mailing-List: contact zsh-workers-help@zsh.org; run by ezmlm Precedence: bulk X-No-Archive: yes List-Id: Zsh Workers List List-Post: List-Help: List-Unsubscribe: X-Seq: 42171 Received: (qmail 406 invoked by uid 1010); 26 Dec 2017 02:23:06 -0000 X-Qmail-Scanner-Diagnostics: from mout.gmx.net by f.primenet.com.au (envelope-from , uid 7791) with qmail-scanner-2.11 (clamdscan: 0.99.2/21882. spamassassin: 3.4.1. Clear:RC:0(212.227.17.20):SA:0(-2.6/5.0):. Processed in 1.330619 secs); 26 Dec 2017 02:23:06 -0000 X-Spam-Checker-Version: SpamAssassin 3.4.1 (2015-04-28) on f.primenet.com.au X-Spam-Level: X-Spam-Status: No, score=-2.6 required=5.0 tests=BAYES_00,FREEMAIL_FROM, RCVD_IN_DNSWL_LOW,RCVD_IN_MSPIKE_H2,SPF_PASS autolearn=ham autolearn_force=no version=3.4.1 X-Envelope-From: llua@gmx.com X-Qmail-Scanner-Mime-Attachments: | X-Qmail-Scanner-Zip-Files: | From: Eric Cook To: zsh-workers@zsh.org Subject: [PATCH] prevent parameters leaking from various completers Date: Mon, 25 Dec 2017 21:17:40 -0500 Message-Id: <20171226021740.81700-1-llua@gmx.com> X-Mailer: git-send-email 2.14.1 X-Provags-ID: V03:K0:RqebHoXb22lmVeJM+9CHti3k6WUyX5AaNp3QOFDbS55Zdt2GRem j5Lysx+VjUla9Du7DmwevRhfrS/3J3BCBcyIeTL3NrcQAn2elMnM0lBPDLbzmJQXIDjckH8 XfL1Ee9P/k00SBGP4iRZXhgmPjJFhHOgS72ODanj+DpnLAEi2oJE1FQXRv6tGhSuG/03yn2 MCvm6G8l7I+yYFZ1xiJOA== X-UI-Out-Filterresults: notjunk:1;V01:K0:XKzio9ZFfCw=:5z3gjatFgsyi2KlrKA/K1y nPtHROH5SvwHII+qzAXRI3MFKL47plobI0TLEHYGbZl9Pr7A4t4TG3QTB6FbOIrlIhw+amdZF gAXZ2oCxlx2Vi+YUVza1n/G6izNWh0x+rWzcgf+s9izx0BV2JLIP/nMEAS48qeZF7jlBiU2Q7 IC5Rkla5AkoGnwhQofhUkvYODHr8fpKPhUiClnTkuFXB0CMGZ0QBon0ItIBVQkByQmYmppzhi 6ZXFmqOPFOgfbemaiSRvU0cfoK2VKhXvNiZEfUnmk2dTL9cSmKGfZ8zTArT8AmCjTEP2h0Nv+ sAdFCUVz7jz/mKbho8+W5pJLmzyQMjAlK3Ix1PZl7BmLmH/j0owqozSsbkE8CG5ad87UMBjlm Sjy0Y0RVvCbVB1No9PmxHRjP7RjJbu+xDYwRMi5T3617dmYMcqBjDdqDiT40f8cBr/SY8tTON pFksbVlzWMY+fNoeeJ+2SrGkT3yfmQtvsc9+VDladnEI4rp42XTz2mN8B222g24qffpACyS5r BPRfmkEESZ2HiQb5Av0HPBE9bmcGQFYQzZP6cp62XGPbRlbBhTHrtxRMZkQDSy+AKhDR1YDHD 6B9viRnr6pxjVxc7NVXudcBWrut2gmzuiIlivY5h1bhgy2Ow8VG721E5+Tjs+6OW56xJ9EQqR pG9wzA3NUWdejduECFwDqe2QJtI8CUBesrMyvPv6CJDPLrb194YxqeyPSWS1757z1ju3McOOI iXfyR/vJbKzrVbdyzZxRqlZSbOogsLxiwxt2FfRFr4oLFOsRGa9nyU24wdSKfAPoyviAiXfTR QpEch9UOf6YjXIqkkZOSodkKRrR75Aiqf5859mKx5Z23F7Jz10= --- Completion/BSD/Command/_portsnap | 2 +- Completion/Linux/Command/_ipset | 2 +- Completion/Linux/Command/_valgrind | 4 ++-- Completion/Redhat/Command/_rpm | 2 +- Completion/Solaris/Command/_prstat | 1 + Completion/Unix/Command/_arp | 2 +- Completion/Unix/Command/_cvs | 2 +- Completion/Unix/Command/_devtodo | 2 +- Completion/Unix/Command/_ffmpeg | 2 +- Completion/Unix/Command/_git | 2 +- Completion/Unix/Command/_gpg | 2 +- Completion/Unix/Command/_ruby | 2 +- Completion/Unix/Command/_ssh | 2 +- Completion/Unix/Command/_tr | 2 +- Completion/Unix/Command/_whois | 1 + Completion/Unix/Command/_yp | 2 +- Completion/Unix/Command/_zfs | 2 +- Completion/X/Command/_xset | 2 +- Completion/Zsh/Command/_cd | 2 +- 19 files changed, 20 insertions(+), 18 deletions(-) diff --git a/Completion/BSD/Command/_portsnap b/Completion/BSD/Command/_portsnap index 0803a842e..b8e1c2555 100644 --- a/Completion/BSD/Command/_portsnap +++ b/Completion/BSD/Command/_portsnap @@ -1,6 +1,6 @@ #compdef portsnap -local curcontext="$curcontext" state line +local curcontext="$curcontext" state line flags typeset -A opt_args flags=( diff --git a/Completion/Linux/Command/_ipset b/Completion/Linux/Command/_ipset index 0d6afc08e..d05f13caf 100644 --- a/Completion/Linux/Command/_ipset +++ b/Completion/Linux/Command/_ipset @@ -1,7 +1,7 @@ #compdef ipset local offset=0 -local -a args from_to hash cmds listopts +local -a args from_to hash cmds listopts addopts _set_types () { _values -S \ "Set type" \ diff --git a/Completion/Linux/Command/_valgrind b/Completion/Linux/Command/_valgrind index 0284ff880..1ae228c94 100644 --- a/Completion/Linux/Command/_valgrind +++ b/Completion/Linux/Command/_valgrind @@ -1,8 +1,8 @@ #compdef valgrind -value-,VALGRIND_OPTS,-default- local curcontext="$curcontext" state line -local -a cmd common common_mem_null \ - args args_{addrcheck,memcheck,cachegrind,helgrind,lackey,massif,none} +local -a cmd common common_{mem_null,read_varinfo} +local -a args args_{addrcheck,memcheck,cachegrind,helgrind,lackey,massif,none} cmd=( '1:command name:_command_names -e' diff --git a/Completion/Redhat/Command/_rpm b/Completion/Redhat/Command/_rpm index b24213e3c..a9306aa6c 100644 --- a/Completion/Redhat/Command/_rpm +++ b/Completion/Redhat/Command/_rpm @@ -45,7 +45,7 @@ _rpm () { local curcontext="$curcontext" state lstate line nm="$compstate[nmatches]" typeset -A opt_args local ret=1 - local -a tmp expl commonopts selectopts + local -a tmp expl commonopts selectopts pathopts commonopts=( '(-v --verbose)--quiet[print as little as possible]' diff --git a/Completion/Solaris/Command/_prstat b/Completion/Solaris/Command/_prstat index 963fad649..1eb38845c 100644 --- a/Completion/Solaris/Command/_prstat +++ b/Completion/Solaris/Command/_prstat @@ -2,6 +2,7 @@ _prstat() { + local d_opt sort_key d_opt=( "u"\:"seconds past the epoch" "d"\:"standard date format" diff --git a/Completion/Unix/Command/_arp b/Completion/Unix/Command/_arp index 80e829022..5b047b2b8 100644 --- a/Completion/Unix/Command/_arp +++ b/Completion/Unix/Command/_arp @@ -2,7 +2,7 @@ local state line expl curcontext="$curcontext" ret=1 typeset -A opt_args -local -a cmds args +local -a cmds args vopt flags flags=( temp pub ) cmds=( diff --git a/Completion/Unix/Command/_cvs b/Completion/Unix/Command/_cvs index 0552d2175..cba3eb773 100644 --- a/Completion/Unix/Command/_cvs +++ b/Completion/Unix/Command/_cvs @@ -882,7 +882,7 @@ _cvs_modified_entries() { } (( $+_cvs_ignore_default )) || -_cvs_ignore_default=( +local _cvs_ignore_default=( RCS SCCS CVS CVS.adm RCSLOG 'cvslog.*' tags TAGS .make.state .nse_depinfo '*\~' '\#*' '.\#*' ',*' '_$*' '*$' '*.old' '*.bak' '*.BAK' '*.orig' '*.rej' '.del-*' '*.a' '*.olb' '*.o' '*.obj' '*.so' '*.exe' '*.Z' '*.elc' '*.ln' diff --git a/Completion/Unix/Command/_devtodo b/Completion/Unix/Command/_devtodo index 2380399b9..8363495cd 100644 --- a/Completion/Unix/Command/_devtodo +++ b/Completion/Unix/Command/_devtodo @@ -5,7 +5,7 @@ typeset -a arg_generic arg_add todo_opts \ priorities typeset -A arg_pair arg_desc typeset -i i -typeset expl +typeset expl arg for ((i=2; i <= $#words; i++)) { if [[ $words[$i] == '--database' ]]; then diff --git a/Completion/Unix/Command/_ffmpeg b/Completion/Unix/Command/_ffmpeg index d68a094d4..c0b229f35 100644 --- a/Completion/Unix/Command/_ffmpeg +++ b/Completion/Unix/Command/_ffmpeg @@ -100,7 +100,7 @@ typeset -A _ffmpeg_flags local -a _ffmpeg_argspecs { - local lastopt + local lastopt REPLY local lastopt_description local lastopt_takesargs local lastopt_type diff --git a/Completion/Unix/Command/_git b/Completion/Unix/Command/_git index 8e3b0eb3d..a46da5b3c 100644 --- a/Completion/Unix/Command/_git +++ b/Completion/Unix/Command/_git @@ -7727,7 +7727,7 @@ for file in ${^fpath}/_git-*~(*~|*.zwc)(-.N); do continue fi - local desc= + local desc= input integer i=1 while read input; do if (( i == 2 )); then diff --git a/Completion/Unix/Command/_gpg b/Completion/Unix/Command/_gpg index 239a032a1..48a36eff2 100644 --- a/Completion/Unix/Command/_gpg +++ b/Completion/Unix/Command/_gpg @@ -1,7 +1,7 @@ #compdef gpg gpgv gpg-zip gpg2=gpg local curcontext="$curcontext" state line expl ret=1 -local -a args allopts dups +local -a args allopts dups extra typeset -A opt_args if [[ $service = gpg-zip ]]; then diff --git a/Completion/Unix/Command/_ruby b/Completion/Unix/Command/_ruby index bb0558fde..7f7af8776 100644 --- a/Completion/Unix/Command/_ruby +++ b/Completion/Unix/Command/_ruby @@ -2,7 +2,7 @@ local curcontext="$curcontext" state line expl desc RUBY ret=1 typeset -A opt_args -local -a opts irb all common charsets suf +local -a opts irb erb all common charsets suf all=( '*-r+[require the library before executing your script]:library name:->library' diff --git a/Completion/Unix/Command/_ssh b/Completion/Unix/Command/_ssh index 984c96e93..5bf28796f 100644 --- a/Completion/Unix/Command/_ssh +++ b/Completion/Unix/Command/_ssh @@ -4,7 +4,7 @@ _ssh () { local curcontext="$curcontext" state line expl suf ret=1 - local args common tmp p1 file cmn cmds sdesc + local args common common_transfer tmp p1 file cmn cmds sdesc typeset -A opt_args common=( diff --git a/Completion/Unix/Command/_tr b/Completion/Unix/Command/_tr index d55fab5ff..efa3d4c91 100644 --- a/Completion/Unix/Command/_tr +++ b/Completion/Unix/Command/_tr @@ -1,7 +1,7 @@ #compdef tr local curcontext="$curcontext" state line expl ret=1 -local args variant +local args variant k local -A descr descr=( -c '[complement characters specified by first string]' diff --git a/Completion/Unix/Command/_whois b/Completion/Unix/Command/_whois index 2dd04f9cd..a8180f60e 100644 --- a/Completion/Unix/Command/_whois +++ b/Completion/Unix/Command/_whois @@ -1,6 +1,7 @@ #compdef whois fwhois _whois () { + local _whois_comp _whois_setup case "$0" in fwhois) _whois_fwhois;; diff --git a/Completion/Unix/Command/_yp b/Completion/Unix/Command/_yp index 104a0b4df..b7619a02e 100644 --- a/Completion/Unix/Command/_yp +++ b/Completion/Unix/Command/_yp @@ -1,6 +1,6 @@ #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 if (( ! $+_yp_cache_maps )); then diff --git a/Completion/Unix/Command/_zfs b/Completion/Unix/Command/_zfs index 553996da0..ce5df5877 100644 --- a/Completion/Unix/Command/_zfs +++ b/Completion/Unix/Command/_zfs @@ -6,7 +6,7 @@ _zfs() { typeset -A opt_args local -a subcmds rw_properties rw_propnames ro_properties create_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 difffields delegatable_perms diff --git a/Completion/X/Command/_xset b/Completion/X/Command/_xset index 53ec635d4..b35a6466b 100644 --- a/Completion/X/Command/_xset +++ b/Completion/X/Command/_xset @@ -111,7 +111,7 @@ _regex_arguments _xset_parse \ \) \# _xset () { - local expl allopts + local expl allopts opt typeset -A desc no eo desc=( diff --git a/Completion/Zsh/Command/_cd b/Completion/Zsh/Command/_cd index 6b8d7ebeb..46237e73d 100644 --- a/Completion/Zsh/Command/_cd +++ b/Completion/Zsh/Command/_cd @@ -22,7 +22,7 @@ _cd_options() { setopt localoptions nonomatch local expl ret=1 curarg -integer argstart=2 noopts +integer argstart=2 noopts match mbegin mend if (( CURRENT > 1 )); then # if not in command position, may have options. -- 2.14.1