Skip to content

Instantly share code, notes, and snippets.

@millerjp
Created May 23, 2014 07:59
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save millerjp/5c7f501d3e2b69a49e24 to your computer and use it in GitHub Desktop.
Save millerjp/5c7f501d3e2b69a49e24 to your computer and use it in GitHub Desktop.
newtab man
# Get command-line help.
newtab -h
# Simpy open new tab.
newtab
# Open new tab and execute command (quoted parameters are supported).
newtab ls -l "$Home/Library/Application Support"
# Open a new tab with a given working directory and execute a command;
# Double-quote the command passed to `eval` and use backslash-escaping inside.
newtab eval "cd ~/Library/Application\ Support; ls"
# Open new tab, execute commands, close tab.
newtab eval "ls \$HOME/Library/Application\ Support; echo Press a key to exit.; read -s -n 1; exit"
# Open new tab and execute script.
newtab /path/to/someScript
# Open new tab, execute script, close tab.
newtab exec /path/to/someScript
# Open new tab and execute script, but don't activate the new tab.
newtab -G /path/to/someScript
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment