Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Re: completion is over thinking things.
On 2019-09-28 9:47 p.m., dana wrote:
http://zsh.sourceforge.net/FAQ/zshfaq04.html#l53
[quote]
If you simply want to try filename completion as a default when
other completions fail, add it to the `|completer|' style for normal
completion, for example:
zstyle ':completion:*' completer _complete _ignored _files
This adds filename completion to the end of the default types of
completion. Your actual completer style may include other actions,
such as expansion or approximate completion.
----------------------------------------
Thanks Dana, that's exactly what I'm thinking. However I dare not cast
such spells without some hand-holding. Here's what I have now, and I
have no idea how any of it works:
====================================
# allow approximate
# Original: zstyle ':completion:*' completer _complete _match _approximate
zstyle ':completion:*' completer _expand _complete
#Tab completion should be case-insensitive.
# Original: zstyle ':completion:*' matcher-list 'm:{a-zA-Z}={A-Za-z}'
zstyle ':completion:*' matcher-list '' 'm:{a-z}={A-Z}'
'm:{a-zA-Z}={A-Za-z}' 'r:|[._-]=* r:|=* l:|=*'
zstyle ':completion:*' auto-description 'specify: %d'
zstyle ':completion:*' format 'Completing %d'
zstyle ':completion:*' group-name ''
zstyle ':completion:*' list-colors ''
zstyle ':completion:*' list-prompt %SAt %p: Hit TAB 'for more', or the
char to insert%s
###zstyle ':completion:*' menu select=2
### zstyle ':completion:*' menu select=long
zstyle ':completion:*' select-prompt %SScrolling active: current
selection at %p%s
zstyle ':completion:*' use-compctl false
zstyle ':completion:*' verbose true
zstyle ':completion:*:default' list-colors ${(s.:.)LS_COLORS}
zstyle ':completion:*:match:*' original only
zstyle ':completion:*:approximate:*' max-errors 1 numeric
zstyle ':completion:*:expand:*' tag-order all-expansions
# cd not select parent dir:
zstyle ':completion:*:cd:*' ignore-parents parent pwd
#Better completion for killall. Original:
zstyle ':completion:*:killall:*' command 'ps -u $USER -o cmd'
# tab completion for PID :D
zstyle ':completion:*:kill:*' force-list always
zstyle ':completion:*:kill:*' command 'ps -u $USER -o
pid,%cpu,tty,cputime,cmd'
zstyle ':completion:*:*:kill:*' menu yes select
zstyle ':completion:*:*:kill:*:processes' list-colors '=(#b)
#([0-9]#)*=0=01;31'
=========================================
... probably half of that stuff is redundant or useless or harmful or
whatever and I don't even know where it came from. I'll take your edit
on faith if you would be so kind. Is there any way a mortal can get any
sort of handle on any of that? Genius borders on insanity.
Messages sorted by:
Reverse Date,
Date,
Thread,
Author