From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 22673 invoked by alias); 9 Mar 2013 15:26:16 -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: X-Seq: 31131 Received: (qmail 2081 invoked from network); 9 Mar 2013 15:26:06 -0000 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on f.primenet.com.au X-Spam-Level: X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,RCVD_IN_DNSWL_NONE autolearn=ham version=3.3.2 Received-SPF: none (ns1.primenet.com.au: domain at closedmail.com does not designate permitted sender hosts) From: Bart Schaefer Message-id: <130309072553.ZM19912@torch.brasslantern.com> Date: Sat, 09 Mar 2013 07:25:53 -0800 In-reply-to: Comments: In reply to joe M "Re: auto list choices" (Mar 8, 10:48am) References: X-Mailer: OpenZMail Classic (0.9.2 24April2005) To: zsh-workers@zsh.org Subject: Re: auto list choices MIME-version: 1.0 Content-type: text/plain; charset=us-ascii 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.