monkeysmili.blogg.se

Iterm open tab in same directory
Iterm open tab in same directory









Set tty_name to do shell script "basename " & (get tty)

iterm open tab in same directory

ITERM OPEN TAB IN SAME DIRECTORY CODE

The following AppleScript code should be written to the Duplicate iTerm tab.scpt file, and will get the working directory of the current iTerm tab and create a new tab, changing to that very same directory, and setting the same tab title (thus duplicating the tab you’ve selected before pressing ⌘ D): Notice that the command duplicate-iterm-tab is to be executed when sent to the terminal, so a line feed must be entered at the end. Since pressing ↩ in the dialog will apply changes, to enter a new line you must press ⌥ ↩ instead.įinally, click OK to create the new shortcut and then you’ll see the new shortcut in the Keys preference panel:Īn AppleScript that duplicates the iTerm tab in use

iterm open tab in same directory

This will open the shortcut addition dialog, where you’ll enter the keyboard shortcut (⌘ D), the action to trigger ( Send text), and the command to be sent to the terminal ( duplicate-iterm-tab) when the shortcut is triggered: To add a new global shortcut, just click on the + button. Why doesn’t a terminal emulator have that shortcut to duplicate a terminal tab? iTerm 2 certainly doesn’t have one, but it does have a preference panel where you can add new keyboard shortcuts: Many applications have a ⌘ D shortcut that allows you to duplicate whatever document the application works with. Adding a new keyboard shortcut to iTerm 2 Or whatever other way you do this, it’s definitely a time waste.

  • by browsing the file hierarchy with Quicksilver and then triggering a Quicksilver action to open the folder in iTerm.
  • by browsing the disk until finding the folder, then creating a new tab, writing cd and dragging the path of the directory or.
  • And wasting time is exactly what it forces me to do when I have to open a new tab in the same directory as an already existing tab. And, as such, I need it to be as much ‘out of my way’ as possible, so that using the terminal doesn’t make me waste time. The terminal is my number one programming tool.









    Iterm open tab in same directory