From: Eric Cook <llua@gmx.com>
To: zsh-workers@zsh.org
Subject: [PATCH] _fc: prevent empty argument removal when expanding $history
Date: Fri, 19 Jun 2015 10:23:24 -0400 [thread overview]
Message-ID: <1434723804-22189-1-git-send-email-llua@gmx.com> (raw)
A few(thousand) errors flood my screen when completing history -<tab>
_fc:79: division by zero
_fc:79: bad math expression: operator expected at `0 signal.h'
_fc:79: lvalue required
_fc:79: bad math expression: operator expected at `$$'
_fc:79: bad math expression: operator expected at `14346'
_fc:79: bad math expression: operator expected at `zshbuiltin...'
_fc:79: bad math expression: illegal character: '
_fc:79: bad math expression: operand expected at `)'
_fc:79: ')' expected
Due to my HISTFILE having this entry:
: 1431102567:0;
(i don't know why it is there either)
---
Completion/Zsh/Command/_fc | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/Completion/Zsh/Command/_fc b/Completion/Zsh/Command/_fc
index 1589244..13f2422 100644
--- a/Completion/Zsh/Command/_fc
+++ b/Completion/Zsh/Command/_fc
@@ -75,7 +75,7 @@ if [[ -n $state ]]; then
_wanted -2V events expl "$state_descr" compadd -M "B:0=" -ld list - \
"${events[@]%%:*}"
elif [[ -prefix - ]]; then
- for num cmd in ${(kv)history}; do
+ for num cmd in "${(@kv)history}"; do
(( num=num - HISTNO ))
events+=( $num:$cmd )
done
--
2.4.3
next reply other threads:[~2015-06-19 14:23 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-06-19 14:23 Eric Cook [this message]
2015-06-20 5:11 ` Mikael Magnusson
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=1434723804-22189-1-git-send-email-llua@gmx.com \
--to=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).