From: Adrian <adrian@planetcoding.net>
To: zsh-users@zsh.org
Subject: Re[2]: Some questions (menu completion and two-line prompts)
Date: Wed, 18 Feb 2015 22:12:38 +0100 [thread overview]
Message-ID: <175130884.20150218221234@planetcoding.net> (raw)
In-Reply-To: <150217200443.ZM20193@torch.brasslantern.com>
[-- Attachment #1: Type: text/plain, Size: 2099 bytes --]
Hi
> TRAPWINCH() {
> zle && echo '' && prompt_adam2_precmd && zle reset-prompt
> }
Thanks, that works perfectly fine!
> } - 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
with that setting I get the correct behavior for cases with a long
list, but in other cases I don't get any menu completion (instead of
the automenu-style completion I was expecting).
In case it matters, thse are my completion-related shellopts:
setopt ALWAYS_LAST_PROMPT
setopt AUTO_LIST
setopt AUTO_MENU
setopt AUTO_NAME_DIRS
setopt AUTO_PARAM_KEYS
setopt AUTO_PARAM_SLASH
unsetopt AUTO_REMOVE_SLASH
unsetopt BASH_AUTO_LIST
unsetopt COMPLETE_ALIASES
setopt COMPLETE_IN_WORD
unsetopt GLOB_COMPLETE
setopt HASH_LIST_ALL
setopt LIST_AMBIGUOUS
unsetopt LIST_BEEP
setopt LIST_PACKED
setopt LIST_ROWS_FIRST
setopt LIST_TYPES
unsetopt MENU_COMPLETE
unsetopt REC_EXACT
Also, another thing I've noticed, with the following zstyles that
should give me a prettier process list:
zstyle ':completion:*:*:*:*:processes' force-list always
zstyle ':completion:*:*:*:*:processes' menu yes select
zstyle ':completion:*:*:*:*:processes' list-colors '=(#b) #([0-9]#) ([0-9a-z-]#)*=01;34=0=01'
zstyle ':completion:*:*:*:*:processes' command "ps -u $USER -o pid,user,args -w -w"
This works fine for `kill` or `renice`, but for some reason `strace -p`
uses the custom command , force-list and immediately goes into a menu.
However, it doesn't use the colors. This is the full completion debug
log from ^X? for the strace completion:
https://gist.github.com/ThiefMaster/f8ffa55988e075e4dc10
--
Adrian
[-- Attachment #2: Type: application/pgp-signature, Size: 830 bytes --]
prev parent reply other threads:[~2015-02-18 21:12 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
2015-02-18 21:12 ` Adrian [this message]
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=175130884.20150218221234@planetcoding.net \
--to=adrian@planetcoding.net \
--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).