Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

OSX Terminal Tabs/Windows

Tags:

terminal

macos

I have been searching for this for a while now and finally I give up and need to ask the question.

I have Terminal.app on my OSX (10.8.4) machine setup to remember my open terminal tabs & windows. This means that when I open the application my previously open tabs & widnows are restored with their working directories preserved.

So, if I have a session with tabs:

  1. /usr/local
  2. ~/github/project
  3. ~/Documents

Upon closing and restarting the Terminal application those tabs will be restored on application startup.

I do not have a .bashrc file in my user directory or any window groups save in Terminal Preferences > Window Groups. Here are my settings for Terminal Preferences > Startup:

  • On startup, open:
    • the radio button for "New window with settings:" is selected with "Pro"
  • Shells open with:
    • Default login shell
  • New windows open with:
    • Default Settings
    • Default Working Directory
  • New tabs open with:
    • Default Settings
    • Same Working Directory

I am pretty sure I have not done any other customizing in the preferences for Terminal other than window size. Is there some other place that settings are being stored? I only ask because I sometimes use other computers and would like to bring this functionality with me.

like image 706
kalisjoshua Avatar asked Aug 03 '13 23:08

kalisjoshua


People also ask

How do I enable tabs on Mac Terminal?

In the Terminal app on your Mac, do one of the following: Press Command-T. Choose Shell > New Tab > New Tab with Profile. The name of the profile that opens is concatenated to the end of the New Tab with Profile menu item.

How do I open a Terminal tab in Windows?

Press the menu button in the top-right corner of the window and select Preferences. In the sidebar, select General. Set Open new terminals in: to Tab or Window.

How do I switch between windows in Mac Terminal?

Try hitting Command + Tab — a pop-up will appear showing every app that currently has windows open on your computer. Press Tab to cycle through them, and release Command when you've highlighted the one you want to switch to. Holding the command and tab keys simultaneously will show you all apps currently running.

How do I get tabs in Terminal?

Press Alt+Right and Alt+Left to switch between active tabs. Alternatively, you can press Alt+Down to see the list of all terminal tabs. To rename a tab, right-click the tab and select Rename Session from the context menu.


1 Answers

I have found the answer due to rubber duck debugging with my friend @artlogic on Twitter. The problem (or solution, however you choose to see it) was in System Preferences > General, the option "Close window when quitting an application" was checked and therefore closing the windows before quitting the application thus nullifying the effect I was hoping for.

That is all.

like image 181
kalisjoshua Avatar answered Oct 13 '22 08:10

kalisjoshua