From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 14814 invoked by alias); 18 Feb 2015 04:05:21 -0000 Mailing-List: contact zsh-users-help@zsh.org; run by ezmlm Precedence: bulk X-No-Archive: yes List-Id: Zsh Users List List-Post: List-Help: X-Seq: 19879 Received: (qmail 23551 invoked from network); 18 Feb 2015 04:05:09 -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 X-CMAE-Score: 0 X-CMAE-Analysis: v=2.1 cv=QM3fnbPO c=1 sm=1 tr=0 a=FT8er97JFeGWzr5TCOCO5w==:117 a=kj9zAlcOel0A:10 a=q2GGsy2AAAAA:8 a=oR5dmqMzAAAA:8 a=-9mUelKeXuEA:10 a=0HtSIViG9nkA:10 a=ARqrO9URAo0bfjnEeRsA:9 a=CjuIK1q_8ugA:10 From: Bart Schaefer Message-id: <150217200443.ZM20193@torch.brasslantern.com> Date: Tue, 17 Feb 2015 20:04:43 -0800 In-reply-to: <1603240867.20150218013647@planetcoding.net> Comments: In reply to Adrian "Some questions (menu completion and two-line prompts)" (Feb 18, 1:36am) References: <1603240867.20150218013647@planetcoding.net> X-Mailer: OpenZMail Classic (0.9.2 24April2005) To: zsh-users@zsh.org Subject: Re: Some questions (menu completion and two-line prompts) MIME-version: 1.0 Content-type: text/plain; charset=us-ascii On Feb 18, 1:36am, Adrian wrote: } } - I'm using AUTO_MENU so I first get a list of completion candidates } and then menu selection by pressing tab once again. That's fine, but } in cases where the candidate list is very long (i.e. doesn't fit on } the screen), I'd rather get menu selection mode immediately instead Try something like zstyle ':completion:*' menu yes=long select=long } - I'm using the adam2 prompt style. When resizing my terminal window } (making it smaller), the pretty horizontal line in the first line of } the prompt is not redrawn, keeping the old width. There are two factors here. (1) each prompt style is responsible for creating its own WINCH trap (the [win]dow [ch]ange signal) and (2) not all terminal emulators send the signal. adam2 doesn't define the trap. The following probably does more work than necessary, but adam2 isn't factored well for performing just the width computations. TRAPWINCH() { zle && echo '' && prompt_adam2_precmd && zle reset-prompt } (Without the "echo ''" the prompt climbs the window until it's the only thing visible. With it, one blank line is added at the bottom.)