Sublime Forum

Run_command without showing output


Is there a way for me to use run_command without it opening an output display at the bottom of my window?

I’m using the Hooks plugin to process files after each save, and having this little output pane appear each time is bothersome. (I’ve found this old doc, but I can’t find the pertinent page in the current version.)



Commands in general don’t have any output. It would help to share what you’re trying to do. There’s a full-ish list of commands here:



Thanks. Suppose I’m trying to run this:

window.run_command("exec", {"cmd": ["bash", "-c", "echo foo"]})

See screenshot:


I end up with some output (which I’ll try to put in a screenshot in my next post because new users are allowed only one screenshot per post).

I reality, though, my goal is to trigger a bash script when any file is saved, and the bash script considers some criteria, then may decide to transmit the file to a server. In this case too, I get the same output pane, which I’d like to suppress.



Here’s the output:

I’ve tried out the quiet option from the doc, but that doesn’t suppress output on a successful execution.



The quiet argument stops the build from displaying the build time and it blocks error diagnostics when the build command fails. If you want exec to not open the panel, you need to change the value of this setting, shown here with it’s default value:

	// Shows the Build Results panel when building. If set to false, the Build
	// Results can be shown via the Tools/Build Results menu.
	"show_panel_on_build": true,

This will also affect build systems as well. If you also use build systems and want to see the panel there, then you need a simple plugin that implements a version of exec that doesn’t display the panel.

The following video shows how to do that (and the description has a link to the example plugins):

1 Like


Wow, thanks!