2016-04-29 7 views
1

Könnte jemand bitte Schritt für Schritt erklären, wie das folgende Build-Skript funktioniert?Sublime Build-Code

{ 
"cmd": ["gnome-terminal -e 'bash -c \"python3 -i -u $file;bash\"'"], 
"shell": true 
} 

Ich weiß, was -i tut (hält Interpreter offen), und der letzte bash keep sthe Terminal geöffnet, aber der Rest ist mir unergründlich. Insbesondere was tun -e, -c und -u, werden sie "Flags" genannt und woher weiß ich mehr über sie? Welche Teile sind spezifisch für Sublime und welche haben mit dem OS zu tun?

+0

[ 'Mann bash'] (http://linux.die.net/man/1/bash) wird alles erklären. – MattDMo

Antwort

1
"gnome-terminal # use this terminal to run the next commands 
    -e # execute the following command 
    ' 
    bash -C# read commands from the following string 
     \" 
      python3 
      -i # looks like interactive mode (sorry not a python dev) 
      -u # force stdin, stdout and stderr to be totally unbuffered 
      $file; # tipically this would be a python script, so you 
        # would end up being able to inspect the environment, 
        # calling functions, seeing their otputs, etc 
      bash # open a new shell 
     \" 
    ' 
" 

ich glaube, das einzige Teil, das Teil von Sublime $file ist sein könnte, aber das hängt davon ab, mit ein bisschen mehr Kontext auf diesem Code, den ich in der Lage könnte eine bessere Antwort zu geben.