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

Re: "Literal" command execution



On Jan 23,  8:51pm, Yuri D'Elia wrote:
}
}   command log [free text follows]
} 
} I want to reduce escaping to the bare minimum. Dollars are not really
} a problem, but I discovered myself to escape '<' '>' and '!' too
} often.
}
} Of course I am already aware of both noglob and nocorrect, but I would
} need something more extreme, as in "feed whatever text, including #,
} etc, that follows the command as arguments".

Have a look at Functions/Zle/url-quote-magic, which relies on being able
to substitute itself for the self-insert ZLE builtin.  You can skip over
the introductory comments about zstyles and focus on the function at the
end of the file, particularly the way it analyzes $KEYS and modifies
$LBUFFER.

A difficulty with this technique is that it becomes difficult to cascade
it with other similar techniques; ZLE doesn't have emacs' concept of
"advice" around a keybinding.



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