2016-04-29 62 views
1

是否有人请详细解释以下构建脚本的工作原理?Sublime构建代码

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

我知道-i做什么(保持开放的解释),并最终bash保持STHE终端开放,但其余的是高深莫测的我。特别是-e,-c-u做什么,他们被称为“标志”,我在哪里了解更多关于它们?哪些部分是针对Sublime的,哪些是针对操作系统的?

+0

['男人bash'(http://linux.die.net/man/1/bash)会解释一切。 – MattDMo

回答

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 
     \" 
    ' 
" 

我认为这可能是崇高的一部分,只有一部分是$file而是取决于与该代码我也许能给出更好的答案多一点背景。