Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Word component characters -- how to have two behaviors?
- X-seq: zsh-users 7186
- From: Kai Grossjohann <kai@xxxxxxxxxxxxxx>
- To: zsh-users@xxxxxxxxxx
- Subject: Word component characters -- how to have two behaviors?
- Date: Tue, 16 Mar 2004 10:51:36 +0100
- Cancel-lock: sha1:eWCW+e10+DCFU3SyTkSws8S5Uvg=
- Mailing-list: contact zsh-users-help@xxxxxxxxxx; run by ezmlm
- Sender: news <news@xxxxxxxxxxxxx>
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