Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
ZLE and compsys miscellaneous
- X-seq: zsh-workers 20279
- From: Bart Schaefer <schaefer@xxxxxxxxxxxxxxxx>
- To: zsh-workers@xxxxxxxxxx
- Subject: ZLE and compsys miscellaneous
- Date: Sun, 22 Aug 2004 15:37:33 -0700 (PDT)
- Mailing-list: contact zsh-workers-help@xxxxxxxxxx; run by ezmlm
- Reply-to: zsh-workers@xxxxxxxxxx
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.
Messages sorted by:
Reverse Date,
Date,
Thread,
Author