http://qs321.pair.com?node_id=11110048


in reply to preserve quotes after $0 + @ARGV interpolation

richard.sharpe:

I'd be surprised if you can find a satisfactory way to do it. If you try NetWallah's suggestion of slogging through history, you may find that the user put a blank before the command and has history suppressing lines beginning with blanks. The user could be running in a number of different shells, so shell trickery could be similarly difficult. So knowing which quotes to use, and/or whether there's any path prefix is added would be quite a trick.

...roboticus

When your only tool is a hammer, all problems look like your thumb.