Tuesday 22 August 2017

macos - Open a new tab in the same directory


Say you are in /very/cool/and/deeply/nested/folder . And you want to open a new terminal tab in the same folder.


How would you do that?


I use Mac OS and Zsh.



Answer



Use Oh-My-Zsh and add the 'osx' plugin in your ~/.zshrc like:


plugins=(osx)

If you use OSX's Terminal App, you also need to add the terminalapp plugin too: credit


plugins=(osx terminalapp)

If you use iTerm you need to set a configuration option (Note that you may not need the zsh plugins for this to work): credit



Preferences > Profiles > Default > General > Working Directory > Reuse previous session's directory option



iTerm2 Preferences panel update to reuse previous session directory.


That's all you need to do!


No comments:

Post a Comment

Where does Skype save my contact's avatars in Linux?

I'm using Skype on Linux. Where can I find images cached by skype of my contact's avatars? Answer I wanted to get those Skype avat...