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

Re: ZLE widget to run gdb on command line



On 2006-10-06 at 10:52 -0400, Chris Johnson wrote:
>    print -s ${(z)BUFFER}
>    BUFFER="gdb !!0 -x =(echo run !!1*)"

If one of the args starts with - then won't that turn into an option to
echo?

Perhaps =(print -r -- run !!1*) would be more reliable?  Or am I missing
something?

Also there's the matter of quoted strings, such as 'foo bar'.

 =(print -r -- ${(Q):-"${(qqq):-run !!1*}"})

The nearest that I can get to preserving the quotes but passing things
through to the command is the above, but it seems a bit strange to be
immediately removing a level of quoting just applied, so I've probably
over-complicated it.

Regards,
-Phil



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