achiurizo / consular

Terminal automation
http://rdoc.info/github/achiu/consular/master/file/README.md
MIT License
813 stars 46 forks source link

[Terminal.app] starting profile seems to open wildly different settings than those specified #91

Closed BJClark closed 13 years ago

BJClark commented 13 years ago

OS X Lion, Terminal.app, Terminitor 0.6.1

I'm new to terminintor, so this may just be a mistake on my part but I have the following configuration:


window do

  tab do
    run "cd ~/dev/goldstar/"
  end
  tab do
    run "cd ~/dev/goldstar/"
  end
  tab do
    run "cd ~/dev/fulfillment/"
  end
  tab do
    run "cd ~/dev/fulfillment/"
  end
end

window do
  tab do
    run "cd ~/dev/goldstar/"
    run 'script/server'
  end
  tab do
    run "cd ~/dev/fulfillment/"
    run 'unicorn_rails -p 3001'
  end
  tab do
    run "cd ~/dev/fulfillment/"
    run 'guard'
  end
end

When I start this profile (single Terminal window, terminitor start profile_name) , I get the following windows: 1st: 6 tabs: 1 clear'd, 2 cd'd into directories, 1 running unicorn_rails, and 1 running guard 2nd: 2 tabs: 1 empty and 1 cd'd into a directory 3rd: 2 tabs: 1 empty and 1 running script server.

So it seems like all my tabs I've defined are created, but not in the correct windows and with some extra blank tabs. Is this an incorrect config file? Is Terminal.app incorrect configured? Or is this a bug in Terminitor?

mcmire commented 13 years ago

Are you using Ruby 1.8? There is currently a bug in Terminitor where tabs get opened in seemingly random windows, and that is probably what you are seeing. See #90.

As far as the blank tabs, this happens because when you open a new terminal window programmatically, it is always opened with a new tab already in it. Therefore each of your tab blocks will create more tabs on top of that. This is also a known bug: #79. The solution would be for Terminitor to either switch to this tab and remove it after setting up a window, or just assume it's there and the first tab block in a window uses that tab.

BJClark commented 13 years ago

Yes, I'm using 1.8.7. I guess I could use 1.9.2?

mcmire commented 13 years ago

You can, and that would at least make it so tabs are opened in the correct windows.

achiurizo commented 13 years ago

I suggest moving over and using consular which is a rewrite of terminitor and has a fix for this to work both in 1.8.7 and 1.9.2. Let me know if this works for you.