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

history-incremental-search-backward and personnal zle widget



Hi,

I find this widget from a zshrc I can't remember and I bind it to the dot key:

# just type 'cd ...' to get 'cd ../..'
rationalise-dot() {
if [[ $LBUFFER = *.. ]]; then   LBUFFER+=/..
else
  LBUFFER+=. fi
} 
zle -N rationalise-dot
bindkey . rationalise-dot

but when I type a dot in a history-incremental-search-backward ( ^R ), it stops the
search and insert a dot in the line instead of inserting a dot in the
searched string. I found something useful in zshzle manpage:
"A restricted set of editing functions is available in the mini-buffer.  An interrupt
signal, as defined by the stty setting, will stop the search and go
back to the original line.  An undefined key will have the same
effect."

My question is: is there a way to keep my binded widget and use it
with history-incremental-search-backward?
-- 
Anthony CHARLES

Attachment: signature.asc
Description: Digital signature



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