The configuration code of sublime does:
{
"CMD" : [" bash ", "- c", "g + + - STD='${file}' c + + 11 - stdlib=libc++ - o '${file_path}/${file_base_name}'"],
"File_regex" : "^ (.. {FNXX==XXFN} *) : ([0-9] +) :? ([0-9] +)? :? $" (. *),
"Working_dir" : "${file_path},
"Selector" : "source. C, source. C + +",
"Variants" :
{
"Name" : "Run",
"CMD" : [" bash ", "- c", "g + + - STD='${file}' c + + 11 - stdlib=libc++ - o '${file_path}/${file_base_name}' & amp; & amp; open - a/applications/iTerm. App " ${file_path}/${file_base_name} \ ""]
}
]
}
The input data after the operation error: Broken Pipe, and why the iTerm will automatically enter the exit command? I didn't write this command of the configuration code!
Although ran out of the right results, but every time an error is not comfortable, so excuse me, is this what went wrong?
CodePudding user response:
Shell constructs to the as piping and redirection are not supportedWriting should be like this:
"CMD" : [" g + + ", "${file}", "- STD=c + + 11", "- stdlib=libc++", "- o", "${file_path}/${file_base_name}"],
Refer to
http://www.sublimetext.com/docs/3/build_systems.html