Skip to content

Instantly share code, notes, and snippets.

@mikker
Created October 22, 2008 10:27
Show Gist options
  • Save mikker/18601 to your computer and use it in GitHub Desktop.
Save mikker/18601 to your computer and use it in GitHub Desktop.
Clone the current tab in OS X Terminal
#!/bin/bash
# Clones the current tab in OS X Terminal
osascript -e 'tell application "Terminal"' -e 'tell application "System Events" to tell process "Terminal" to keystroke "t" using command down' -e "do script with command \"cd `pwd`;clear\" in selected tab of the front window" -e 'end tell' &> /dev/null
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment