A ruby script to open a new tab (or a new window) and run command in it on Mac OS X. It is modified based on the answer from tig regarding question posted at here, I Expanded its feature a bit by allowing -w option top run command in a new window.
./dt ls -l will run "ls -l" in a new tab ./dt -w top will run command top in a new window
- Tested with Ruby 1.8.7 on Mac OS X 10.7.2
- I have not been able to make the script to run more than one command at once, for example ./dt "ls -l;top" won't work as expected. I will dig more into this when I know more ruby.
- Actually I found a script for a task like this is a bit over-killed. Check out the better approach in dot_bash_profile
- Link to the original post on my blog