Open matopeto opened 4 months ago
Compare to xbar where all cases seems to work as I expect:
1.
Array
(
[0] => /Users/matej/Projects/Others/BitBarPlugins/.write.php
)
2.
Array
(
[0] => /Users/matej/Projects/Others/BitBarPlugins/.write.php
[1] => text
)
3.
Array
(
[0] => /Users/matej/Projects/Others/BitBarPlugins/.write.php
[1] => text text
)
4.
Array
(
[0] => /Users/matej/Projects/Others/BitBarPlugins/.write.php
[1] => text text
)
5.
Array
(
[0] => /Users/matej/Projects/Others/BitBarPlugins/.write.php
[1] => text's
)
6.
Array
(
[0] => /Users/matej/Projects/Others/BitBarPlugins/.write.php
[1] => text's
)
7.
Array
(
[0] => /Users/matej/Projects/Others/BitBarPlugins/.write.php
[1] => text\'s
)
8.
Array
(
[0] => /Users/matej/Projects/Others/BitBarPlugins/.write.php
[1] => text\\'s
)
9.
Array
(
[0] => /Users/matej/Projects/Others/BitBarPlugins/.write.php
[1] => text"s
)
10.
- no valid syntax
11.
Array
(
[0] => /Users/matej/Projects/Others/BitBarPlugins/.write.php
[1] => text"s
)
12.
Array
(
[0] => /Users/matej/Projects/Others/BitBarPlugins/.write.php
[1] => \'text\"s\'
)
Swiftbar 2.0.0
Hi, i want to pass single quote as parameter to bash program (with
terminal=false
)In general, I want to make sure that I escape input from (paste/clipbard)board.
I was unable to pass single qoute, (only in some cases i was able to pass double quote)
Here is what i try:
I have simple test PHP script to determine and logs parameters
and I have this swiftbar script:
And results
✅ This is OK - no parameters given, no parameters logged
✅ This is OK - one parameter is given, same parameter is recieved and logged
✅ This is OK - one parameter is given, same parameter is recieved and logged
✅ This is OK - one parameter is given, same parameter is recieved and logged
Console.app output:
❌🤔 my script wasn't callet at all (but this may be excepted behaviour, but see 9. with double quotes it works)
Console.app output is without parameters, so I can't determine wat was actually called
❌ This not OK - only "text" was passed to the program, even when param1 was escaped/surrounded by double quotes
❌ This not OK - as in previews example, parameter was cut just before single quote
❌ This not OK - as in previews example, parameter was cut just before single quote
✅ This is OK
✅ This is OK - i would expect such a behaviour
❌ This not OK - only "text" was passed to the program, even when param1 was escaped/surrounded by single quotes
❌🤔 my script wasn't callet at all
is there any way to escape and pass single quote in bash program parameter? Or maybe see some logs what swiftbar parse and call when i click to row?