From: Ray Andrews <rayandrews@eastlink.ca>
To: zsh-users@zsh.org
Subject: Re: completion is over thinking things.
Date: Sun, 29 Sep 2019 08:29:36 -0700 [thread overview]
Message-ID: <486df91b-8c6c-b129-2538-15e4d6126eb9@eastlink.ca> (raw)
In-Reply-To: <9EEEB6F5-9B9C-4C8E-8593-4917F8AF79DF@dana.is>
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.
next prev parent reply other threads:[~2019-09-29 15:30 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-09-28 17:05 Ray Andrews
2019-09-28 17:13 ` Roman Perepelitsa
2019-09-28 17:36 ` Ray Andrews
2019-09-29 4:47 ` dana
2019-09-29 15:29 ` Ray Andrews [this message]
2019-09-29 16:44 ` Bart Schaefer
2019-09-29 18:41 ` Ray Andrews
2019-09-29 19:06 ` Bart Schaefer
2019-09-29 19:35 ` Ray Andrews
2019-09-29 13:09 ` Mikael Magnusson
2019-09-29 15:11 ` Ray Andrews
2019-09-29 15:19 ` Pier Paolo Grassi
2019-09-28 17:14 ` gmail
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=486df91b-8c6c-b129-2538-15e4d6126eb9@eastlink.ca \
--to=rayandrews@eastlink.ca \
--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).