zsh-users
 help / color / mirror / code / Atom feed
From: Ray Andrews <rayandrews@eastlink.ca>
To: zsh-users@zsh.org
Subject: Re: Most minimal configuration challenge
Date: Sun, 28 Aug 2022 06:59:35 -0700	[thread overview]
Message-ID: <db106de1-32a6-fd1e-67bb-602400bd5a48@eastlink.ca> (raw)
In-Reply-To: <1c9b6072-26e7-467e-b8cc-7d44f15eaf1b@www.fastmail.com>


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



  reply	other threads:[~2022-08-28 14:00 UTC|newest]

Thread overview: 40+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-08-27  4:30 Felipe Contreras
2022-08-27 16:10 ` Daniel Shahaf
2022-08-27 19:32   ` Vincent Bernat
2022-08-27 20:04     ` Lawrence Velázquez
2022-08-27 23:53       ` Ray Andrews
2022-08-28  7:53         ` zzapper
2022-08-28 10:30         ` Daniel Shahaf
2022-08-28 13:59           ` Ray Andrews [this message]
2022-08-28 18:29             ` Daniel Shahaf
2022-08-31  9:28               ` Vincent Lefevre
2022-08-31 14:17                 ` Ray Andrews
2022-09-01 21:52                   ` Felipe Contreras
2022-09-02  1:41                     ` Lawrence Velázquez
2022-09-02  1:26                   ` Lawrence Velázquez
2022-09-02  1:49                     ` Felipe Contreras
2022-09-02  5:40                       ` Lawrence Velázquez
2022-09-02  7:38                         ` Felipe Contreras
2022-09-02 10:36                       ` Daniel Shahaf
2022-09-02 14:26                         ` Ray Andrews
2022-09-04  7:13                           ` Daniel Shahaf
2022-09-04 16:30                             ` Ray Andrews
2022-09-02 10:39                       ` [PATCH] zstyle: Correct and expand docs (was: Re: Most minimal configuration challenge) Daniel Shahaf
2022-09-02 15:05                         ` Bart Schaefer
2022-09-04  6:51                           ` Daniel Shahaf
2022-09-02 13:55                       ` Most minimal configuration challenge Ray Andrews
2022-09-04  7:21                         ` Daniel Shahaf
2022-09-04 16:34                           ` Ray Andrews
2022-09-02 13:32                     ` Ray Andrews
2022-09-04  7:28                       ` Daniel Shahaf
2022-09-02  9:53                   ` Daniel Shahaf
2022-09-02  9:26                 ` Daniel Shahaf
2022-09-02 14:44                   ` Vincent Lefevre
2022-09-04  6:42                     ` Daniel Shahaf
2022-09-05  9:47                       ` Vincent Lefevre
2022-09-12  8:59                         ` Daniel Shahaf
2022-08-28 18:58             ` Bart Schaefer
2022-08-28 19:23               ` Felipe Contreras
2022-08-28 19:35               ` Ray Andrews
2022-08-28 18:57   ` Felipe Contreras
2022-09-02  1:36 ` Vincent Lefevre

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=db106de1-32a6-fd1e-67bb-602400bd5a48@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).