1
I want to use custom build commands for C source codes in Sublime Text 3. I am using the following code as sublime-build :
{
"cmd" : ["gcc $file_name -o ${file_base_name} && konsole -e ''bash -c \"./${file_base_name}; echo 'Process returned $?'; read -p 'Press [ENTER] to exit.'\"''"],
"selector" : "source.c",
"shell": true,
"working_dir" : "$file_path"
}
Here, the portion echo 'Process returned $?';
is causing serious problem (i.e. build doesn't run at all!) due to trying access to $?
.
What is the alternative (or what is the right syntax) to use $?
here ?
Your suggestion is fine but what I do badly need is keep the
konsole
window open. Your suggestion exits console window immediately after execution. – Chitholian – 2018-05-12T15:40:09.350Have you checked if their is a option in the konsole command that lets it continue to be open? – Cristian Matthias Ambæk – 2018-05-12T17:53:57.127