Closed nashley closed 9 years ago
I like the simplicity of this solution, but unfortunately, it breaks if the parameter contains single quotes that are already escaped :(
@p-e-w By "already escaped" do you mean filenames such as \'test
? I'm using the latest commit (ea68d4706c187f49b0dca6a61761e2971a214c16), and I can't even get the semantic menu to recognize the file (on another note, the \t
in \test
is converted into a tab when displayed in finalterm; try touch \\test && ls
).
However, this method should work correctly if the menu recognized the name.
\'test
turns into '\'\''test'
, which is correctly interpreted by bash as \'test
.
What am I missing here?
I ran a few more tests and found that indeed, I cannot seem to break this solution in practice, which is awesome and means it is definitely a step forward.
Therefore: Merged!
I would like to give you credit for your contribution in Final Term's About dialog, but I did not find your name anywhere. If you want to see your name listed there, just drop me a line and it will happen. Otherwise, no problem either; in any case your work is very much appreciated!
@p-e-w Sweet! My name, which I've now added to my profile, is "Nick Ashley." I'm glad that I can be a part of this project, and I'd like to help solve more bugs when possible.
Well, Nick, you've just been immortalized :smile_cat:!
Fixes #266 by escaping filenames with quotes so that they can be properly used by tools listed in the semantic menu. This approach (as opposed to that found in a0def85875f8625aedcb50c19a83094955c098e0) is better for readability and for use with the clipboard if a group of text is selected and then copied.