-
Notifications
You must be signed in to change notification settings - Fork 46
[Terminal.app] A new window initialized with some tabs always has an empty tab #79
Comments
Read my mind, I would like this feature as well. |
You can work around this by running a command in the window outside of the tab... therefore if you have 2 tabs, only declare 1 tab and then put a command right in the window... window do
tab do
run 'bundle exec spork'
end
run 'bundle exec guard'
end And I'm not entirely sure this is a "work around" it just seems to make sense that terminitor would operate this way. |
Can I programmatically close the original separate window then? The point is to only have the tabs I defined and no extra launch window or tab. On Jun 22, 2011, at 10:08 PM, [email protected] wrote:
|
one way to avoid having that extra tab is to use the run 'irb' # current(first) tab
tab 'ruby -v' # second tab
tab 'whatever' # third tab As @cfeduke mentioned, that applies to a new window context as well if you want to have the current tab of the new window to spawn the commands. |
I'm assuming you mean since you launch terminitor from an actual terminal and it creates new windows that you'd like either the original window re-used (not sitting behind the terminitor created windows) or as you said automatically closed. This was irking me as well. I haven't looked too closely at the source to see if there's anyway to bind the first window to the parent term but I got around this by making a custom Alfred alias that executes the following command: cd ~/Projects/tabletop_calculator ; terminitor start ; exit Its important to also make sure your Terminal preferences under Shell you've selected the value "Close the shell if exited cleanly" for the "When the shell exits" option. If you aren't using Alfred and you just want to make the launching Terminal close you can make a script - in my case this is #!/usr/bin/env bash
cd ~/Projects/tabletop_calculator
terminitor start
kill -9 $PPID This took a bit to figure out since |
@cfeduke: Closing the terminal that launches the terminitor command is not quite what I'm talking about -- it can be annoying, but it isn't surprising, because after all, you're opening a new window (which I always prefer, in case I'm launching the terminitor command from a window that already has tabs and I don't want to pollute it with more). I just mean if your termfile opens a new window, it's always initialized with a tab, so if you create multiple tabs within the window, you always end up with a blank initial tab. Which is surprising (from a termfile point of view). @achiu: That works, but what if you want to give the first tab a name? |
In other words, if you have a file like
then tab 1 will be empty and tab 2 will contain the "foo" command. This is probably just because as soon as you create a window in Terminal.app, you always get one tab to start out with.
So it would be nice if terminitor just switched to the first tab and removed it (if there is a way to do this). It's not a huge deal, except I have to do it every time :/
The text was updated successfully, but these errors were encountered: