zsh-workers
 help / color / mirror / code / Atom feed
From: dana <dana@dana.is>
To: Eric Cook <llua@gmx.com>
Cc: zsh-workers@zsh.org
Subject: Re: [PATCH] prevent parameters leaking from various completers
Date: Sat, 6 Jan 2018 00:43:27 -0600	[thread overview]
Message-ID: <185B6D54-C800-46AF-9BEC-7B5A0AA04046@dana.is> (raw)
In-Reply-To: <20171226021740.81700-1-llua@gmx.com>

On 25 Dec 2017, at 20:17, Eric Cook <llua@gmx.com> wrote:
>-  local desc=
>+  local desc= input

I noticed that this fouls up git completion. The first time i do `git add
whatever<TAB>`, it prints out a bunch of garbage (since this is happening in a
loop and typeset_silent isn't set). Fix attached.

Also, in _cd, we're marking match, mbegin, and mend as integers when they're
actually arrays. I don't think that will hurt anything, but...?

dana


diff --git a/Completion/Unix/Command/_git b/Completion/Unix/Command/_git
index a46da5b3c..bf5c1e702 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= input
+  local desc= input=
   integer i=1
   while read input; do
     if (( i == 2 )); then

diff --git a/Completion/Zsh/Command/_cd b/Completion/Zsh/Command/_cd
index 46237e73d..32f53a78b 100644
--- a/Completion/Zsh/Command/_cd
+++ b/Completion/Zsh/Command/_cd
@@ -21,8 +21,8 @@ _cd_options() {
 
 setopt localoptions nonomatch
 
-local expl ret=1 curarg
-integer argstart=2 noopts match mbegin mend
+local expl ret=1 curarg match mbegin mend
+integer argstart=2 noopts
 
 if (( CURRENT > 1 )); then
   # if not in command position, may have options.


      parent reply	other threads:[~2018-01-06  6:43 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-12-26  2:17 Eric Cook
2018-01-03 17:00 ` Oliver Kiddle
2018-01-04 14:07   ` Eric Cook
2018-01-06  6:43 ` dana [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=185B6D54-C800-46AF-9BEC-7B5A0AA04046@dana.is \
    --to=dana@dana.is \
    --cc=llua@gmx.com \
    --cc=zsh-workers@zsh.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.vuxu.org/mirror/zsh/

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).