Sublime Forum

How to use --command with args

#1

This works: st2 --command find_next

because the command doesn’t require args. I’d like to do this: st2 --command set_setting setting=theme value='Soda Light.sublime-theme' but I can’t seem to find a syntax for --command that allows me to specify args.

Anybody done it?

0 Likes

#2

In bash, you should be able to do:

subl --command 'set_setting {"setting": "theme", "value": "Soda Light.sublime-theme"}'
0 Likes

#3

Hi Jon, thanks for the reply. Sorry I didn’t see it earlier. Your suggestion doesn’t seem to be working for me. I’m in bash, and the quoting is fine. The command runs silently and exits with zero status but doesn’t have any effect.

0 Likes