Behavior when cmd is passed
ikeji opened this issue · 1 comments
This is more like feature request or request of behavior change.
A. Here is the behavior when I didn't pass the cmd argument.
Steps:
- run 'dvtm' command.
- exit the shell by typing ^d.
Result:
The shell and dvtm is exit.
B. Here is current behavior when I run dvtm with cmd argument.
Steps:
- run 'dvtm python' command.
- exit the python by typing ^d.
My expected result:
Python and dvtm is exit.
Actual result:
The python is exit and dvtm starts another shell.
So, dvtm is not exit.
Does this behavior is expected?
Is there any way to skip open new shell?
Version
$ dvtm -v
dvtm-0.15+40.g311a8c0-1build1 © 2007-2016 Marc André Tanner
Use case
I want to open new window like:
xterm -e 'dvtm python'
And expected the window is closed when exist the python.
Check the actions[]
array in your config.h file, which defines a set of actions that are executed when dvtm is started. It's probably set to this default value, which is to create a terminal window.
static Action actions[] = {
{ create, { NULL } },
};
To get the behavior you're looking for, you could remove the create action and always specify the python command when you run dvtm, or you could change that one create action to open python every time you start dvtm. I haven't messed around with the actions array much, something similar to this, but maybe not exactly this, should work if you want to do that.
static Action actions[] = {
{ create, { "python" } },
};