Home Download Buy Blog Forum Support

Running Command Prompt commands from Sublime's Console.

Running Command Prompt commands from Sublime's Console.

Postby Esente on Wed Aug 18, 2010 1:10 am

I realize that Sublime's Console runs Python code. However, I work in Erlang that deals with command prompt and would like to be able to type the commands directly into the console to run it, for example, typing this into Console:

run("erl -run foo -run foo bar -run foo bar baz 1 2")

Console will capture output of command prompt and display out.

I saw some people has written plugin for it, but since commands need arguments, using hotkey will not work in this case.
Esente
 
Posts: 26
Joined: Mon Aug 16, 2010 7:20 pm

Re: Running Command Prompt commands from Sublime's Console.

Postby schmiidt on Thu Aug 19, 2010 9:08 am

Esente wrote:I saw some people has written plugin for it, but since commands need arguments, using hotkey will not work in this case.


+1

A while ago I suggested a similar feature http://www.sublimetext.com/forum/viewtopic.php?f=4&t=1237.

I am using a lot of different command-line tools that output file locations e.i. file name and line no. I added some of these tools to the build menu, but it didn't really work me, because I often tweak these commands with command-line arguments and options. So I abandoned this approach after I've added more than 20 basic command-line combinations to the build menu.

At the moment, I am just using one "build" command (Replay.sublime-build).

Code: Select all
build cmd.exe /C type output
lineNumberRegex
showWhenFinished true
workingDir $ProjectDir


I use this command to replay the output from the last shell command I ran outside Sublime. This actually works reasonable well for me, but I still believe that Sublime is missing a tool panel that would allow us to type in ad-hoc commands (see my last post).
schmiidt
 
Posts: 20
Joined: Wed Oct 07, 2009 12:50 pm

Re: Running Command Prompt commands from Sublime's Console.

Postby schmiidt on Thu Aug 19, 2010 9:41 am

Sorry, I just realized that I forgot to write an output filter (lineNumberRegex) for the Replay command. The whole point of Replay is of cause to add an output filter ;-)
schmiidt
 
Posts: 20
Joined: Wed Oct 07, 2009 12:50 pm

Re: Running Command Prompt commands from Sublime's Console.

Postby Esente on Thu Aug 19, 2010 11:50 pm

Yeah, I'm just using one Build command for now. It's just for compiling the source. But in order to test the code, I would need arguments. I can't write tons of build files just to test my code.
Esente
 
Posts: 26
Joined: Mon Aug 16, 2010 7:20 pm


Return to Ideas and Feature Requests

Who is online

Users browsing this forum: Exabot [Bot] and 7 guests