From: Bart Schaefer <schaefer@brasslantern.com>
To: zsh-workers@zsh.org
Subject: Re: auto list choices
Date: Sat, 09 Mar 2013 07:25:53 -0800 [thread overview]
Message-ID: <130309072553.ZM19912@torch.brasslantern.com> (raw)
In-Reply-To: <CAHjjW16220P5ZTGvaw=vwJ8vRVerh2RPANU=NrT6p=6v5GnjaQ@mail.gmail.com>
On Mar 8, 10:48am, joe M wrote:
}
} This code does a list-choices on every self-insert. Might be of
} interest to someone.
Some brief critique:
(1) It's annoying to use application/octet-stream for text attachments.
This probably isn't your fault, you just have a broken email program,
or you haven't told it that the ".zsh" extension means a text type.
(2) In this line in list-completion:
if ((compstate[list_lines] > ${INCR_MAX_MATCHES:-20} \
|| compstate[list_lines]+BUFFERLINES+2 > LINES))
The backslash-continuation is not necessary, "((" begins a syntactic
construct which continues even across newlines to the matching "))".
(3) In show-choices, this:
unsetopt localoptions BANG_HIST
is not doing what you want. This UNSETS the localoptions option, which
makes the unset of BANG_HIST become permanent outside the function. You
meant
setopt localoptions NO_BANG_HIST
or more verbosely
setopt localoptions; unsetopt BANG_HIST
However, locally unsetting BANG_HIST is the correct solution to the
problem you were having, so good job figuring that out.
next prev parent reply other threads:[~2013-03-09 15:26 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-03-07 3:57 joe M
2013-03-07 4:23 ` joe M
2013-03-07 4:35 ` joe M
2013-03-08 15:48 ` joe M
2013-03-09 15:25 ` Bart Schaefer [this message]
2013-03-10 5:45 ` joe M
2013-03-10 18:23 ` Bart Schaefer
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=130309072553.ZM19912@torch.brasslantern.com \
--to=schaefer@brasslantern.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).