Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Re: [PATCH] prevent parameters leaking from various completers
- X-seq: zsh-workers 42239
- From: dana <dana@xxxxxxx>
- To: Eric Cook <llua@xxxxxxx>
- Subject: Re: [PATCH] prevent parameters leaking from various completers
- Date: Sat, 6 Jan 2018 00:43:27 -0600
- Cc: zsh-workers@xxxxxxx
- Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=dana-is.20150623.gappssmtp.com; s=20150623; h=mime-version:subject:from:in-reply-to:date:cc :content-transfer-encoding:message-id:references:to; bh=HGY8EtWSbvalPN/NJYlL83ezJYxbqwC1stlclvRCd58=; b=vj/v521I1REIBGd3McqGw/NalgsUIMd3VzF5Q96jemIcVO6cXHC6a1q/Lz+FAMvB0g t/errK4NRCDvUeI/U1bWgT1Nj3UzZ8Sfvo5N2ZEWdq4FbIraHqd2xv2f8haQMrfVnlAy kVcxKdkaWYjTHW6AFJSYRTcNHrWWJeBjx5KuXo1dEJZuOflPYip+SltU+QuQ8mBmRamR fisUKhEaTHyAHVqoHqI/JhpdqKYd1fUGVptivJk+XTrxvJysFTnVE6tDKfF526Kxj1hx 4CpQV+cq0JHN/deAAgzbEpcd8ZNFAjnC2X2Pe825E5xgzlzQ9g0baZZuHoSbhlKgIoFj z6aQ==
- In-reply-to: <20171226021740.81700-1-llua@gmx.com>
- List-help: <mailto:zsh-workers-help@zsh.org>
- List-id: Zsh Workers List <zsh-workers.zsh.org>
- List-post: <mailto:zsh-workers@zsh.org>
- List-unsubscribe: <mailto:zsh-workers-unsubscribe@zsh.org>
- Mailing-list: contact zsh-workers-help@xxxxxxx; run by ezmlm
- References: <20171226021740.81700-1-llua@gmx.com>
On 25 Dec 2017, at 20:17, Eric Cook <llua@xxxxxxx> 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.
Messages sorted by:
Reverse Date,
Date,
Thread,
Author