zsh-users
 help / color / mirror / code / Atom feed
From: Bart Schaefer <schaefer@brasslantern.com>
To: zsh-users@zsh.org
Subject: Re: zsh-newuser-install
Date: Sat, 26 Apr 2014 14:10:23 -0700	[thread overview]
Message-ID: <140426141023.ZM31797@torch.brasslantern.com> (raw)
In-Reply-To: <ljgdh3$cc9$1@ger.gmane.org>

On Apr 26,  3:49pm, Yuri D'Elia wrote:
}
} You gave a quite nice list of features here, and with very concise
} configuration settings that do not depend on each other.
} 
} I would actually *love* to have a zshcheatsheet manual page with this
} sort of thing.

Here's an idea:  Let's collect some default completion zstyles and put
them in a file in $fpath, named so that compinit arranges for it to be
autoloaded the same way it picks up completers etc.  Then, if that
function is defined, execute it from compinit.  This would make it easy
to change locally (just put a file of that name earlier in $fpath) and
it also allows us to create the defaults by consensus.

Per my previous remark about testing for prior existence, all the styles
in this defaults file would need to be defined using this function or
something like it:

emulate zsh -c 'default_zstyle() {
  local -a patstyle defn
  if [[ $1 = (-e|-|--) ]]
  then patstyle=( $2 $3 )
  else patstyle=( $1 $2 )
  fi
  zstyle -g defn $patstyle || zstyle $*
}'

Examples:

----
default_zstyle ':completion:*' group-name ''
default_zstyle ':completion:*' verbose true
default_zstyle ':completion:*' ignore-parents parent pwd ..
default_zstyle ':completion:*' format '%SCompleting %U%d%u%s'
default_zstyle ':completion:*:messages' format %S%d%s
default_zstyle ':completion:*:warnings' format 'No matches for %U%d%u'

# Double colon here to avoid overriding the value set by "zed"
default_zstyle ':completion::*' insert-tab 'pending=1'
----

Thoughts?  Name for this file?


  reply	other threads:[~2014-04-26 21:12 UTC|newest]

Thread overview: 31+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-04-16 14:35 setopt interactivecomments shawn wilson
2014-04-16 17:27 ` Bart Schaefer
2014-04-16 17:37   ` shawn wilson
2014-04-17 14:37     ` Ray Andrews
2014-04-17 19:37       ` Bart Schaefer
2014-04-17 21:36         ` Ray Andrews
2014-04-17 22:07           ` shawn wilson
2014-04-17 22:48             ` Bart Schaefer
2014-04-17 23:51               ` shawn wilson
2014-04-17 22:41           ` Bart Schaefer
2014-04-18  3:10             ` Ray Andrews
2014-04-18 11:59             ` Roman Neuhauser
2014-04-23 15:50         ` zsh-newuser-install Peter Stephenson
2014-04-23 20:31           ` zsh-newuser-install Yuri D'Elia
2014-04-23 23:53             ` zsh-newuser-install Mikael Magnusson
2014-04-24  6:23               ` zsh-newuser-install Yuri D'Elia
2014-04-24 14:34                 ` zsh-newuser-install Ray Andrews
2014-04-24 16:02                   ` zsh-newuser-install Yuri D'Elia
2014-04-25  1:38                     ` zsh-newuser-install Ray Andrews
2014-04-24 16:04                   ` zsh-newuser-install Axel Beckert
2014-04-25 15:43               ` zsh-newuser-install Martin Vaeth
2014-04-25 16:21                 ` zsh-newuser-install Peter Stephenson
2014-04-26 10:07                   ` zsh-newuser-install Martin Vaeth
2014-04-26 20:21                     ` zsh-newuser-install Peter Stephenson
2014-04-26 20:38                     ` zsh-newuser-install Bart Schaefer
2014-04-25 17:03                 ` zsh-newuser-install Bart Schaefer
2014-04-26 13:49                 ` zsh-newuser-install Yuri D'Elia
2014-04-26 21:10                   ` Bart Schaefer [this message]
2014-04-28 17:35                     ` zsh-newuser-install Bart Schaefer
2014-04-24  1:05           ` zsh-newuser-install Ray Andrews
2014-04-17 19:04     ` setopt interactivecomments Bart Schaefer

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=140426141023.ZM31797@torch.brasslantern.com \
    --to=schaefer@brasslantern.com \
    --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).