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

Re: Most minimal configuration challenge




Sounds like you need a test suite for your zshrc.
Sometimes it's a guess what some change might do, one does not even know what to expect. Particularly the 'completion' stuff is baffling.  Here's mine, it sorta works but I despair at
understanding the syntax:

(Mind, sagacious as always, IIRC, Bart explained that this stuff was written by some Polish genius who then disappeared and left the mere mortals trying to figure out how to drive it or improve it but committed to using it anyway because it was so awesomely powerful. Sorta like using Thor's Hammer to
drive nails.)

------------------------------------

# =============================================================================
# COMPLETIONS:

zstyle ':completion:*:default' list-colors ${(s.:.)LS_COLORS}
zstyle ':completion:*' auto-description 'specify: %d'
zstyle ':completion:*' format 'Completing %d'
zstyle ':completion:*' list-prompt %SAt %p: Hit TAB 'for more', or the char to insert%s zstyle ':completion:*' select-prompt %SScrolling active: current selection at %p%s

# allow approximate
# Original: zstyle ':completion:*' completer _complete _match _approximate

#{
# This will not complete:
# Sky\ above\ 49°30\'N\ 123°30\'W\ at\ Sun\ 2020\ Dec\ 20\ 20\ 26_files/
# ... it won't finish the " _files " part:
# As of 2021-02-08 it *will* complete but it takes three presses of TAB:
#zstyle ':completion:*' completer _files _expand _complete

# This completes on one press of TAB.
zstyle ':completion:*' completer _expand _complete _files
#}

#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:*' verbose true
zstyle ':completion:*:match:*' original only
zstyle ':completion:*:approximate:*' max-errors 1 numeric
zstyle ':completion:*:expand:*' tag-order all-expansions
# cd should not select parent dir:
zstyle ':completion:*:cd:*' ignore-parents parent pwd

# End of completions.

-----------------------------------------------------------

... the docs do everything but help you understand.


Or perhaps you would be better served by a /smaller/ zshrc, so fewer
things can go wrong in the first place.

Yeah, that gets back to the original point,  what do we really need?  One should build up from the basics one step at a time, while understanding exactly what one is doing.  If we had lots of beginners it would be fun to have a sort of 'configuration club' where folks could share and compare.  But I'll never forget my first efforts to get Linux working, CLI was bash of course and out of the box it comes with NOTHING, not even command recall, not even a working backspace key -- DOS was sophisticated by comparison -- and I almost quit.  Same with zsh -- out of the box it's stone-age naked.  Why?  Give the beginner something
with basic functionality, like a backspace key.

Thanks for the report.  Yes, I should add docs, but that's not at the
top of my list.  In the meantime, just open the zshrc in that directory
and see what's in it.  There is little else there.

Good, next time I'm in a shelling mood, I'll look forward to checking those out.  It is almost
always the case that resources are there, if only one can find them.





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