zsh-workers
 help / color / mirror / code / Atom feed
From: Bart Schaefer <schaefer@brasslantern.com>
To: zsh-workers@sunsite.dk
Subject: ZLE and compsys miscellaneous
Date: Sun, 22 Aug 2004 15:37:33 -0700 (PDT)	[thread overview]
Message-ID: <Pine.LNX.4.61.0408172027580.842@toltec.zanshin.com> (raw)

I just noticed that down-line-or-history and up-line-or-history don't 
behave as I expected when given a negative NUMERIC.  They go up or down 
lines within the buffer as expected, but if there is no room to move in
the buffer they use the absolute value of NUMERIC for the history motion.

------

When you use #compdef -k or -K in a widget function file, the widget name 
used is always given an underscore prefix.  Remind me why?  This makes it 
a little confusing to set new styles for that widget context.  In any case 
that behavior should be documented.

------

I'd like to suggest a new #keyword introducer to be recognized by compinit
(or maybe it should just be a new option to #compdef, but I'll write about
it as a new keyword here).  The keyword is "generic", which means that the
function defined in the file is a completer for use with the _generic 
widget function.

For example, the _insert_kept function I posted in the "tip of the day"
thread could be a file that looks like:

    #generic complete-word \C-xE
    (( $#kept )) || return 1
    local action
    zstyle -s :completion:$curcontext insert-kept action
    if [[ -n $action ]]
    then compstate[insert]=$action
    fi
    compadd -a kept

And the #generic line would cause compinit to autoload the function and 
execute:

    zle -C _insert_kept complete-word _generic
    zstyle ':completion:_insert_kept:*' completer _insert_kept
    bindkey '\C-xE' _insert_kept

I anticipate that Oliver is going to object to having a zstyle set like 
that, but if that's the only way _generic can be passed a completer, I 
don't see much choice in the matter.


             reply	other threads:[~2004-08-22 22:39 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2004-08-22 22:37 Bart Schaefer [this message]
2004-08-24  6:53 ` Wayne Davison

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=Pine.LNX.4.61.0408172027580.842@toltec.zanshin.com \
    --to=schaefer@brasslantern.com \
    --cc=zsh-workers@sunsite.dk \
    /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).