Zsh Mailing List Archive
Messages sorted by: Reverse Date, Date, Thread, Author

Re[2]: Some questions (menu completion and two-line prompts)


>     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:


Attachment: pgpLMN_6EMt96.pgp
Description: PGP signature

Messages sorted by: Reverse Date, Date, Thread, Author