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

Word component characters -- how to have two behaviors?



I understand that I can use the following two lines so that word-based
movement and deletion commands will consider slashes and so on to be
word separators:

autoload -U select-word-style
select-word-style bash

But where "\ef" moves a bash-style word forward, I'd like "\eF" to
move a shell-style word forward.  Is there an easy way to make these
bindings?  I've only come up with the clumsy:

kai-forward-word () {
    select-word-style shell; zle forward-word; select-word-style bash;
}
zle -N kai-forward-word kai-forward-word
bindkey "\eF" kai-forward-word

Is there a more elegant way to do this?

(Using zsh 4.2.0-pre-4.)

Kai



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