pgaskin / NickelMenu

The easiest way to launch scripts, change settings, and run actions on Kobo e-readers.
https://pgaskin.net/NickelMenu
MIT License
512 stars 25 forks source link

Allow whitespace in cmd_spawn/cmd_output args #19

Closed NiLuJe closed 4 years ago

NiLuJe commented 4 years ago

Fix #16

(Mildly tested, feel free to try to break it ;)).

pgaskin commented 4 years ago

I'm testing it using these items:

# pid should not show
menu_item:main:spawn1:cmd_spawn:quiet:sleep 5
chain:dbg_msg:Success
# pid should show
menu_item:main:spawn2:cmd_spawn:sleep 5
# /tmp/nm should be asd, pid should show
menu_item:main:spawn3:cmd_spawn:quiet_ || echo asd > /tmp/nm
# /tmp/nm should be "asd:echo dfg", pid should show
menu_item:main:spawn4:cmd_spawn:echo asd:echo dfg > /tmp/nm
# /tmp/nm should be "asd:echo dfg", pid should not show
menu_item:main:spawn5:cmd_spawn :  quiet  :  echo asd:echo dfg > /tmp/nm