Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

ttab

Package Overview
Dependencies
Maintainers
1
Versions
24
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

ttab - npm Package Compare versions

Comparing version 0.1.4 to 0.1.5

3

CHANGELOG.md

@@ -7,2 +7,5 @@ # Changelog

* **v0.1.5** (2015-06-01):
* [doc] Improved CLI usage help.
* **v0.1.4** (2015-06-01):

@@ -9,0 +12,0 @@ * [doc] Improved CLI usage help; keywords added to `package.json`.

2

package.json

@@ -5,3 +5,3 @@ {

"private": false,
"version": "0.1.4",
"version": "0.1.5",
"os": [

@@ -8,0 +8,0 @@ "darwin"

@@ -81,53 +81,72 @@ [![npm version](https://badge.fury.io/js/ttab.svg)](http://badge.fury.io/js/ttab)

SYNOPSIS:
ttab [-w] [-s settings] [-t title] [-g|-G] [-d dir] [command [param1 ...]]
ttab [-w] [-s settings] [-t title] [-g|-G] [-d dir] [command [param1 ...]]
DESCRIPTION:
Opens a new Terminal.app tab and optionally executes a command and assigns settings,
among other options.
Opens a new Terminal.app tab and optionally executes a
command and assigns settings, among other options.
Important: Terminal must be allowed assistive access in order for this utility
to work, which requires one-time authorization with administrative privileges.
If you get error messages instead of being prompted, authorize Terminal.app via
System Preferences > Security & Privacy > Privacy > Accessibility.
IMPORTANT: *Terminal.app must be allowed assistive access* in order for this
utility to work, which requires one-time authorization with administrative
privileges. If you get error messages instead of being prompted, authorize
Terminal.app via System Preferences > Security & Privacy > Privacy >
Accessibility.
The new tab will run a login shell (i.e., load the user's shell profile) and by default
inherit the working directory from the parent shell.
The new tab will run a login shell (i.e., load the user's shell profile)
and by default inherit the working directory from the parent shell.
-w creates the new tab in a new window rather than in Terminal's front window.
-s specifies the settings (profiles) to apply to the new tab, as defined in Terminal.app's
Preferences > Profiles, such as 'Grass'; settings determine the appearance and behavior
of the new tab; name matching is case-insensitive.
-t specifies a custom title to assign to the new tab; otherwise, if a command is specified,
its first token will become the new tab's title.
-d explicitly specifies a working directory for the new tab; by default, the invoking shell's
working directory is inherited (even if -w is also specified).
-g (back*g*round) causes Terminal not to activate, but within Terminal, the new tab
will become the active tab; useful in scripts that launch other applications and
don't want Terminal to steal focus later.
-G causes Terminal not to activate *and* the active element within Terminal not to change;
i.e., the active window and tab stay the same. If Terminal happens to be active, the new
tab will effectively open in the background.
-w
creates the new tab in a new window rather than in Terminal's front
window.
-s
specifies the settings (profiles) to apply to the new tab, as
defined in Terminal.app's Preferences > Profiles, such as 'Grass';
settings determine the appearance and behavior of the new tab; name
matching is case-insensitive.
-t
specifies a custom title to assign to the new tab; otherwise, if a
command is specified, its first token will become the new tab's title.
-d
explicitly specifies a working directory for the new tab; by default, the
invoking shell's working directory is inherited (even if -w is also
specified).
-g
(back*g*round) causes Terminal not to activate, if it isn't the frontmost
application); within Terminal, however, the new tab will become active
active tab; useful in scripts that launch other applications and
don't want Terminal to steal focus later.
-G
causes Terminal not to activate *and* the active element within Terminal
not to change; i.e., the active window and tab stay the same. If Terminal
happens to be fronmost, the new tab will effectively open in the
background.
NOTE: With -g or -G specified, for technical reasons, Terminal or the new tab will still
activate *briefly, temporarily* in most scenarios.
NOTE: With -g or -G specified, for technical reasons, Terminal / the new
tab will still activate *briefly, temporarily* in most scenarios.
Quoted parameters are handled properly and there's no need to quote the command as a whole,
provided it is a *single* command.
Quoted parameters are handled properly and there's no need to quote the
command as a whole, provided it is a *single* command.
Prefix such a single command with 'exec' to automatically close the tab
when the command terminates, assuming the tab's settings are configured to
close the tab on termination of the shell.
To specify *multiple* commands, use 'eval' followed by a single, *double*-quoted string
in which the commands are separated by ';' Do NOT use backslash-escaped double quotes inside
this string; rather, use single-character backslash-escaping as needed.
Use 'exit' as the last command to automatically close the tab when the command
terminates; precede it with 'read -s -n 1' to wait for a keystroke first.
To specify *multiple* commands, use 'eval' followed by a single,
*double*-quoted string in which the commands are separated by ';' Do NOT
use backslash-escaped double quotes *inside this string*; rather, use
*single-character backslash-escaping* as needed. Use 'exit' as the last
command to automatically close the tab when the command terminates,
assuming the tab's settings are configured to close the tab on termination
of the shell.
Precede 'exit' with 'read -s -n 1' to wait for a keystroke first.
Alternatively, pass a script name or path; prefix with 'exec' to automatically
close the tab when the script terminates.
EXAMPLES:
ttab -t Green -s Grass # create new tab with title 'Green' using settings 'Grass'
ttab ls -l "$HOME/Library/Application Support"
ttab -d "\~/Library/Application Support" ls -1
ttab eval "ls \$HOME/Library/Application\ Support; echo Press a key to exit.; read -s -n 1; exit"
ttab /path/to/someScript # execute a script and keep the tab open on termination
ttab exec /path/to/someScript # execute a script and close the tab on termination.
# Create new tab with title 'Green' using settings 'Grass'
ttab -t Green -s Grass
ttab ls -l "$HOME/Library/Application Support"
ttab -d "\~/Library/Application Support" ls -1
ttab /path/to/someScript arg1 arg2
# Execute a script and close the tab on termination (settings permitting).
ttab exec /path/to/someScript arg1 arg2
# Pass a multi-command string via 'eval', wait for keystroke, then exit.
ttab eval "ls \$HOME/Library/Application\ Support;
echo Press a key to exit.; read -s -n 1; exit"
```

@@ -166,2 +185,5 @@

* **v0.1.5** (2015-06-01):
* [doc] Improved CLI usage help.
* **v0.1.4** (2015-06-01):

@@ -168,0 +190,0 @@ * [doc] Improved CLI usage help; keywords added to `package.json`.

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc