Thread (2 messages) 2 messages, 2 authors, 2016-06-15
  • (off-list ancestor, not in this archive)
  • Re: Shell quoting · Junio C Hamano <hidden> · 2016-06-15
  • Re: Shell quoting · Linus Torvalds <torvalds@osdl.org> · 2016-06-15

Re: Shell quoting

flat view

From: Junio C Hamano <hidden>
Date: 2016-06-15 22:42:06

Linus Torvalds [off-list ref] writes:
You could expand "sq_quote" to handle '!' and '\' characters the exact
same way it handles the single tick (end single-tick quoting, do \! or \\
and start single-tick quoting again) and that might be good enough for
tcsh.

IOW, the string "a\b'c!d" would become 'a'\\'b'\''c'\!'d' after 
surrounding sq_quote with single-ticks.
I vaguely recall you had a code that assumes what sq_quote()
produces and unquote it without using shell.  If somebody does
the above change for '!' and '\', that code may need to be
checked and adjusted as well.

Sorry I could not give more specifics -- I've been looking for
the code I am talking about unsuccessfully for the past 30
minutes..
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help