Closed ksvirsky closed 4 years ago
Thanks again, @ksvirsky.
I've merged the PR into the master branch, but I'm not ready to package it and publish it to the npm registry / Homebrew.
I will let you know once I've done so.
The challenges are:
the -g
/ -G
options:
-g
can be implemented at all (would require a way to determine and reactivate the previously active application)-G
works by omitting --active
with (implied) --tab
, but with --window
there's no way to prevent the new window from receiving the focus.implementing the default logic of keeping the new tab open after executing a given command, based on whatever shell the specified profile is configured to use is not really an option; re-executing $SHELL
after execution of the command is an approximation of the desired behavior, but not quite the same - both because context from the original shell may be lost, and because $SHELL
may not be the shell the target profile is configured to use.
Hi Michael. Glad to hear that. I agree these items have to be resolved first. Thanks.
I finally got around to completing this - v0.7.0 has been released; thanks again.
See the manual for details.
There are limitations around passing commands to run in the new tab, unfortunately, notably defaulting to $SHELL
even if the specified profile (-s
) may be configured to run a different shell.
The new tab is kept open by default even if you specify a command, as on macOS.
To automatically close a tab after command execution, use exec
before a single command or end a multi-command command string with exit
.
Hi Michael. Recreated the same pull request to be merged. I just need the changes urgently and created separate package. Will use ttab with pleasure once you could review and merge this pull request. Thank you.