-
Notifications
You must be signed in to change notification settings - Fork 394
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Backslash is printed when escaping double quotes in cmd #194
Comments
What are you wanting to accomplish? It seems that its working as expected. If I manually type in terminal |
Probably I'm not fully understanding how escaping works. Let me give you a real life example. If I insert this in the shuttle.json config file I have to escape the double quotes of the print part otherwise it breaks the config file, so my cmd looks like this: But when I execute this through shuttle it runs it with the backslashes breaking the actual command:
What am I doing wrong? |
Btw, if I apply the same to the name tag it works like I would expect: Name tag is configured as follows: And in the menu it shows up without the backslashes:
|
@Franklin88 Awesome, Thanks for the real world examples. I'll look into a solution. |
@Franklin88 Seems that we have a bug with the way double quotes are escaped. |
Great! Thx |
Not sure if this is the same issue or not, but I'm having an issue with wanting to use a backslash in my command and it not working. I try running it from the menu, and nothing happens (as soon as I remove the backslash, it works fine). It's the one right after "Mobile":
I tried it with and without the double backslash, and neither works. |
@WorldWideWebb I have confirmed that the bug is causing this issue as well. I'll try to have 1.2.8 for the weekend. |
Anything new on this bug? |
It's resolved on my dev system. Doing some more testing before I release. I can send you what I have if you want to test. Currently on Gitter if you want to chat there. |
Menus have been translated to Spanish Added a bash script to the default JSON file that allows writing a command to terminal without execution fitztrev#200 Fixed an issue that prevented character escapes fitztrev#194 Fixed an issue that prevented tabs from opening in terminal on macOS fitztrev#198 Fixed an issue where english was not the default language.
Should be fixed in v1.2.8. Let me know if its not working for you. |
Works great! Thanks! |
@WorldWideWebb Thanks for the update! |
Hi! Thanks for the new release. The escaping works much better now. However I'm still experiencing some problems when the shuttle.json file is parsed. Let's say I want to open Google and close the terminal after that (just as an example): Configuration: Output: As can be seen a backslash is printed before the semicolon which breaks the command. As curiosity, if I put a space before the semicolon it works as expected: "cmd": "open https://www.google.es ; exit" However, I understand that it should work with and without a space like it does from the command line. |
@Franklin88
this should open in the default browser. |
Test configuration:
{
"name": "Test escaping characters",
"cmd": "echo "Hello"; echo 'world'; "
}
Output:
$ echo "Hello"; echo 'world';
"Hello"
world
Expected:
$ echo "Hello"; echo 'world';
Hello
world
Notes:
Same result using unicode \u0022 => {"cmd": "echo \u0022Hello\u0022; echo 'world'; "}
Environment:
MacOS 10.10.5
Shuttle v1.2.7
iTerm2 Build 3.0.8
Terminal.app 2.5.3 (343.7)
The text was updated successfully, but these errors were encountered: