How to make a new terminal tab open in the same directory the current one?

 
Thread Tools Search this Thread
Operating Systems OS X (Apple) How to make a new terminal tab open in the same directory the current one?
# 1  
Old 01-14-2011
How to make a new terminal tab open in the same directory the current one?

I want to press "apple + T" to open a new terminal tab. This terminal tab must be in the same directory as the current one. Anyone knows how to do that?

Thanks a lot!
# 2  
Old 01-14-2011
Hi.

I don't think it's possible just by using cmd-T.

But you could try some AppleScript.

If you put this script (in this case in the $HOME directory), then set up a keyboard short-cut in Terminal Preferences (Keyboard, then +) (see attachments) to run it:

Code:
osascript <<!
  tell app "terminal" to do script "cd '$(pwd)'" 
!

Or, of course, you could just run it from the command line.
How to make a new terminal tab open in the same directory the current one?-term_prefs_1jpg
How to make a new terminal tab open in the same directory the current one?-term_prefs_2jpg
This User Gave Thanks to Scott For This Post:
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. UNIX for Beginners Questions & Answers

Pssh open terminal?

Hi folks. I'm using pssh to run commands on a cluster, (pis/Raspian/Jessie) but I'm opening a app that runs and runs and runs. It's quite helpful to vnc to a machine to make sure it's still running ok now and then, but they're basically left alone. Of course when pssh runs a command it... (2 Replies)
Discussion started by: MuntyScrunt
2 Replies

2. UNIX for Beginners Questions & Answers

awk to parse current and next row in tab-delimited file

Hi there, I would like to use awk to reformat a tab-delimited file containing three columns as follows: Data file: sample 1 173 sample 269 530 sample 687 733 sample 1699 1779 Desired output file: sample 174..265, 531..686, 734..1698 I need the value... (5 Replies)
Discussion started by: emiley
5 Replies

3. Shell Programming and Scripting

Open gnome-terminal with multi tabs and automatically run a script in each tab

Hi All , i am trying to create an alias to open a new gnome-terminal and run some commands in each tab & to have a specific name for each tab i am using csh , tried this command gnome-terminal --tab -t "s1" --tab -t "s2" --tab -t "s3" --tab -t "s4" it opened 4 tabs but the title didn't... (0 Replies)
Discussion started by: Assem
0 Replies

4. Web Development

Open php script in same tab

I have the following code $upc = $_POST; $_SESSION = $_POST; if(strlen($upc)< 5) { ?> <script type="text/javascript"> <!-- ... (4 Replies)
Discussion started by: Meow613
4 Replies

5. Red Hat

Alias to Open new terminal?

Hello everyone. I want to create an alias of vi, so that everytime I use vi to edit something, it will open up a new terminal session, with the vi file that I want to edit. So for example if I enter: sudo vi /etc/bashrc This will open up a brand new terminal window, with the /etc/bashrc file... (1 Reply)
Discussion started by: Lost in Cyberia
1 Replies

6. UNIX for Dummies Questions & Answers

Setting the current directory path to terminal title

In ubuntu, I want to update the title of the terminal window with the current directory path. Any ideas how this can be achieved? ---------- Post updated at 02:22 PM ---------- Previous update was at 02:08 PM ---------- Done it ---------- Post updated at 02:30 PM ---------- Previous update... (2 Replies)
Discussion started by: kristinu
2 Replies

7. Red Hat

How to open terminal automatically.

hi, I am using red hat .I want that when ever the user login in GUI interface the terminal windows automatically open and then the user want to logout it 1st close the terminal and then login. There is a file in #ls -a i.e .bashrc and .bash_logout I does not know how to add my... (0 Replies)
Discussion started by: mypass
0 Replies

8. HP-UX

color terminal and tab completion?

hello, i'm a linux zealot (fedora), so i know a some about unix. the company i work for uses HP-UX though and there are a few quirks i'd like smooth out by making them work more like my beloved redhat type systems...=) right now they have all users using ksh and completion is done by hitting... (4 Replies)
Discussion started by: clockworks
4 Replies

9. Windows & DOS: Issues & Discussions

looking for linux like tab terminal for windows

Hello all is there any free tool like linux tabbed terminal but for windows im used to work with putty and its great but i wander if there something like putty but with tabs thanks (12 Replies)
Discussion started by: umen
12 Replies

10. Shell Programming and Scripting

Finding files in current directory when 100,000's files in current directory

Hi All I was wondering what is the most efficient way to find files in the current directory(that may contain 100,000's files), that meets a certain specified file type and of a certain age. I have experimented with the find command in unix but it also searches all sub directories. I have... (2 Replies)
Discussion started by: kewong007
2 Replies
Login or Register to Ask a Question