I think there are some issues when running an application from C::B using Build/{Run,Build and Run} commands on Linux:
- it is possible to set "console_shell" ("Settings/Environment
Settings/General Settings/Shell to run commands in"), but that value is never used in the Run method - see src/plugins/compilergcc/compilergcc.cpp, method Run, line 1772 - instead of Read("/console_shell") the DEFAULT_CONSOLE_SHELL is used when creating the command line to run
- both the console_shell and console_terminal can generally accept the command to run (optionally cb_console_runner, the application and its arguments) in 2 forms - as a one string (where spaces must be escaped or the whole string surrounded with \" or \') or an "array" of strings (multiple strings separated with spaces)
xterm and gnome-terminal used as console_terminal have the option (-e, resp. -x) to accept the "array" form, but the console_shells (bash, tcsh, ...) are using "-c" option that accepts only one string. But the current code (the Run method) doesn't reflect this difference.
The attached patch uses the assumption that the console_shell requires one string. Complex solution would be to make the style for the arguments (string/array of string) configurable for both the console_terminal and console_shell config options.
References:
https://bugzilla.redhat.com/show_bug.cgi?id=461120http://forums.codeblocks.org/index.php/topic,7247.0.html[attachment deleted by admin]