Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Re: Various notes on KSH_GLOB
On Thu, 30 May 2013 16:30:45 +0200
Christian Neukirchen <chneukirchen@xxxxxxxxx> wrote:
> (Perhaps I just need a widget to type \^ when I type ^ after whitespace...)
This is quite straightforward, by the way...
quote-at-start() {
if [[ $NUMERIC = '' ]]; then
[[ $LBUFFER[-1] = ' ' || $LBUFFER = '' ]] && LBUFFER+='\'
fi
zle self-insert
}
zle -N quote-at-start
bindkey \^ quote-at-start
That gets confused by
echo 'stuff ^like ^this'
though some magic with split-shell-arguments ought to fix that. You can
suppress the behaviour with ESC-1 beforehand, though come to think of it
using ^V beforehand is simpler and more obvious.
pws
Messages sorted by:
Reverse Date,
Date,
Thread,
Author