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

Re: Why does _main_complete not try the next completer when $_comp_mesg is non-zero?



On Wed, Mar 31, 2021 at 12:25 PM Oliver Kiddle <opk@xxxxxxx> wrote:
> What does your completer style look like out-of-interest? Do you set
> zstyle ':completion:*:warnings' format ?

zstyle -e ':completion:*' completer _autocomplete.config.completer
_autocomplete.config.completer() {
  reply=( _expand _complete _correct _complete:-fuzzy _history _history:-fuzzy _ignored )
  [[ CURRENT -eq 1 && -z $PREFIX$SUFFIX && $compstate[context] == command ]] &&
    reply=( _complete )
}

zstyle -e ':completion:*:warnings' format _autocomplete.config.warnings-format
_autocomplete.config.warnings-format() {
  local d=${${(j:, :)_lastdescr[@]:#}/(#m)*, /$MATCH[1,-3] or }
  reply=( $'%{\e[01;02;39m%}'"No ${${:-$PREFIX$SUFFIX}:+matching }$d found."$'%{\e[0m%}' )
}




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