zsh-users
 help / color / mirror / code / Atom feed
From: Bart Schaefer <schaefer@brasslantern.com>
To: zsh-users@zsh.org
Subject: Re: Some questions (menu completion and two-line prompts)
Date: Tue, 17 Feb 2015 20:04:43 -0800	[thread overview]
Message-ID: <150217200443.ZM20193@torch.brasslantern.com> (raw)
In-Reply-To: <1603240867.20150218013647@planetcoding.net>

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.)


  reply	other threads:[~2015-02-18  4:05 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-02-18  0:36 Adrian
2015-02-18  4:04 ` Bart Schaefer [this message]
2015-02-18 21:12   ` Re[2]: " Adrian

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=150217200443.ZM20193@torch.brasslantern.com \
    --to=schaefer@brasslantern.com \
    --cc=zsh-users@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).