Add config to allow terminals to run in given dir

Add in terminal_chdir and terminal_chdir_path so that when terminals start they are run in a specific directory.

Documentation to be added.

Github issue #42
This commit is contained in:
Duncan Ferguson 2015-11-09 22:46:02 +00:00
parent 3fcc001cca
commit ffe6a9d283
6 changed files with 110 additions and 32 deletions

View file

@ -63,6 +63,7 @@ sub script {
my \$port=shift;
my \$mstr=shift;
my \$command="$comms $comms_args ";
my \$cwd=qx!pwd!;
open(PIPE, ">", \$pipe) or die("Failed to open pipe: \$!\\n");
print PIPE "\$\$:\$ENV{WINDOWID}"
or die("Failed to write to pipe: $!\\n");
@ -99,7 +100,10 @@ sub script {
\$command .= " \\\"$config_command\\\"";
}
\$command .= " ; $postcommand";
warn("Running:\$command\\n"); # for debug purposes
# provide some info for debugging purposes
warn("Running: \\n");
warn(" pwd: \$cwd"); # already has newline
warn(" cmd: \$command\\n");
exec(\$command);
HERE