From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on inbox.vuxu.org X-Spam-Level: X-Spam-Status: No, score=-1.0 required=5.0 tests=DKIM_ADSP_CUSTOM_MED, FREEMAIL_FROM,MAILING_LIST_MULTI,RCVD_IN_DNSWL_NONE,SPF_PASS autolearn=ham autolearn_force=no version=3.4.2 Received: (qmail 2940 invoked from network); 6 Apr 2020 11:50:24 -0000 Received-SPF: pass (primenet.com.au: domain of zsh.org designates 203.24.36.2 as permitted sender) receiver=inbox.vuxu.org; client-ip=203.24.36.2 envelope-from= Received: from ns1.primenet.com.au (HELO primenet.com.au) (203.24.36.2) by inbox.vuxu.org with UTF8ESMTPZ; 6 Apr 2020 11:50:24 -0000 Received: (qmail 20968 invoked by alias); 6 Apr 2020 11:50:13 -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: List-Unsubscribe: X-Seq: 24762 Received: (qmail 29436 invoked by uid 1010); 6 Apr 2020 11:50:13 -0000 X-Qmail-Scanner-Diagnostics: from mail-io1-f48.google.com by f.primenet.com.au (envelope-from , uid 7791) with qmail-scanner-2.11 (clamdscan: 0.102.2/25772. spamassassin: 3.4.4. Clear:RC:0(209.85.166.48):SA:0(-2.0/5.0):. Processed in 1.519268 secs); 06 Apr 2020 11:50:13 -0000 X-Envelope-From: mikachu@gmail.com X-Qmail-Scanner-Mime-Attachments: | X-Qmail-Scanner-Zip-Files: | Received-SPF: pass (ns1.primenet.com.au: SPF record at _netblocks.google.com designates 209.85.166.48 as permitted sender) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to; bh=Xvjp9ApnQYWz+lNGaHjglCkTgjTYxRsh7p/b5STPMkI=; b=sbQwo8vZg8WB0q2vbyc3PnTc56dGWEJ3+QkkplcAxWUBJcsZgSQR+gRP0+pCFI5EQ9 XwbDqyazQFRx8G1knMVgSoRlWvgGTUx0F+1UyGrDVBY2J/YKBYWE9BaqNk7uHZuzp7bn ZrFTx2nEDoaJ1beWZgP7RwwEoaKY8O9npGBxT0+AgfZZxfI5B2Dth1OoOkjLEFIycP78 BqCbHqjvCENcsPhMOmwWYtj/IIgUdgN68zr1F2AhZpmc3prEUuAdWy9YRUtpKKkwZgHy I8BVivsSLY/m9PgXKn/0dOY7tBnu4fNmw+vnPHscINmFP8Ta7cZ0XqPt4O0z+Gw38NFZ ia2g== X-Gm-Message-State: AGi0PuaYvhKvIicU6dInH4qDU40uN1gFdXPkU2SAOpvwwHsjw7FCSiNk QsxBGwWyBtASDW8XiIA5eqdt7llYHGIZGePVqNZ2sw== X-Google-Smtp-Source: APiQypJWE8nO3uec2MDCUkXi8nY9lFS+ifxps7w68y1S8aYGO6hZZCU+lzI+HACNkLWIUR2h10tyiawk1wO1OY1q1pU= X-Received: by 2002:a5d:8742:: with SMTP id k2mr12783269iol.120.1586173778125; Mon, 06 Apr 2020 04:49:38 -0700 (PDT) MIME-Version: 1.0 In-Reply-To: <20200405212935.GB9554@blackswan.r0t.uk> References: <20200405143846.GC32510@blackswan.r0t.uk> <20200405150012.GD32510@blackswan.r0t.uk> <20200405212935.GB9554@blackswan.r0t.uk> From: Mikael Magnusson Date: Mon, 6 Apr 2020 13:49:37 +0200 Message-ID: Subject: Re: Is it possible to limit the height or rows of menus? To: zsh-users@zsh.org Content-Type: text/plain; charset="UTF-8" On 4/5/20, Dave Woodfall wrote: > On 2020-04-05 16:00, > Dave Woodfall put forth the proposition: >> On 2020-04-05 15:38, >> Dave Woodfall put forth the proposition: >> > zsh 5.6.2 >> > >> > When using menu select with a command that has many options, all rows >> > in the terminal may be filled, and the context is lost (i.e. any >> > previous commands and their output disappear past the top of the >> > terminal, so needing to scroll back up to see them.) >> > >> > What I would like to do is limit the number of rows. >> > >> > I tried doing something like: >> > >> > LINES=10 grep - >> >> And typically, after asking a question we find the solution >> ourselves. I defined a custom function that contains: >> >> LINES=15 zle complete-word > > I spoke too soon. > > It looks using a custom function bound to the tab key causes some > problems, even without setting LINES. > > Now when I get to the end and cycle back to the top, the prompt goes > up and overwrites the previous line. > > This is what I'm using: > > zle -N _vi-tab > > _vi-tab() { > LINES=15 zle complete-word > } > > bindkey '\t' _vi-tab > > Any ideas? Normally you would use zle -C for custom completer functions, but I don't want to get involved further than this :). -- Mikael Magnusson