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.3.1 to 0.4.0

7

CHANGELOG.md

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

* **[v0.4.0](https://github.com/mklement0/ttab/compare/v0.3.1...v0.4.0)** (2016-09-13):
* [enhancement] `-a Terminal|iTerm2` now allows specifying the target Terminal
application, which is useful for launching `ttab` from non-terminal applications
such as [Alfred](http://alfredapp.com).
* [fix] Specifying a syntactically invalid shell command to execute in the
new tab now causes `ttab` to report a nonzero exit code.
* **[v0.3.1](https://github.com/mklement0/ttab/compare/v0.3.0...v0.3.1)** (2016-06-03):

@@ -9,0 +16,0 @@ * [enhancement] Support for iTerm2 v3 added (whose AppleScript syntax changed fundamentally)

45

doc/ttab.md

@@ -7,3 +7,3 @@ <!-- DO NOT EDIT THIS FILE: It is auto-generated by `make update-man` -->

Opens a new terminal tab or window in OS X's Terminal application or iTerm.
Opens a new terminal tab or window in OS X's Terminal application or iTerm2.

@@ -18,2 +18,3 @@ ttab [-w] [-s <settings>] [-t <title>] [-g|-G] [-d <dir>] [<cmd> [<arg>...]]

-d <dir> specify working directory
-a Terminal|iTerm2 open tab or window in Terminal.app / iTerm2
<cmd> [<arg>...] command to execute in the new tab

@@ -25,10 +26,10 @@

`ttab` opens a new Terminal.app or iTerm.app tab with a variety of options,
`ttab` opens a new Terminal or iTerm2 tab with a variety of options,
including executing a command in the new tab, assigning a title and working
directory, and opening the tab in a new window.
Note: iTerm.app support is experimental in that it is currently not covered by
Note: iTerm2 support is experimental in that it is currently not covered by
the automated tests run before every release.
IMPORTANT: **Terminal.app/iTerm.app must be allowed assistive access** in order
IMPORTANT: **Terminal/iTerm2 must be allowed assistive access** in order
for this utility to work, which requires one-time authorization with

@@ -66,11 +67,13 @@ administrative privileges. If you get error messages instead of being prompted,

the appearance and behavior of the new tab.
o Terminal.app: settings sets are defined in Preferences > Profiles;
o Terminal: settings sets are defined in Preferences > Profiles;
name matching is case-*in*sensitive, and specifying nonexistent settings
causes an error.
o Term.app: profiles are defined in Preferences > Profiles; name matching is
case-*sensitive*, and specifying a nonexistent profile is ignored.
o iTerm2: profiles are defined in Preferences > Profiles; name matching
is case-*sensitive*, and specifying a nonexistent profile causes an error.
* `-t <title>`
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.
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.
CAVEAT: As of iTerm2 v3.0.9, choosing a title that exactly matches the
settings name specified with `-s` causes the title to be ignored.

@@ -83,16 +86,23 @@ * `-d <dir>`

* `-g`
(back*g*round) causes Terminal/iTerm not to activate, if it isn't the
(back*g*round) causes Terminal/iTerm2 not to activate, if it isn't the
frontmost application); within the application, however, the new tab will
become the active tab; useful in scripts that launch other applications and
don't want Terminal/iTerm to steal focus later.
don't want Terminal/iTerm2 to steal focus later.
* `-G`
causes Terminal/iTerm not to activate *and* the active element within
causes Terminal/iTerm2 not to activate *and* the active element within
the application not to change; i.e., the active window and tab stay the
same. If Terminal/iTerm happens to be frontmost, the new tab will
same. If Terminal/iTerm2 happens to be frontmost, the new tab will
effectively open in the background.
NOTE: With `-g` or `-G` specified, for technical reasons, Terminal/iTerm /
NOTE: With `-g` or `-G` specified, for technical reasons, Terminal/iTerm2 /
the new tab will still activate *briefly, temporarily* in most scenarios.
* `-a Terminal` or `-a iTerm2`
explicitly specifies the terminal application to use; by default, the
terminal application from which this utility is run is implied, if
supported, with Terminal used as the fallback.
This options is useful for calling this utility from non-terminal
applications such as Alfred (https://www.alfredapp.com/).
## STANDARD OPTIONS

@@ -128,3 +138,3 @@

# Open new tab with title 'Green' using settings 'Grass':
# Open new tab with title 'Green' using settings (profile) 'Grass':
ttab -t Green -s Grass

@@ -139,3 +149,3 @@

# Execute a command and exit.
# If configured via settings, also close the tab.
# If configured via the default profile, also close the tab.
ttab exec /path/to/someprogram arg1 arg2

@@ -146,1 +156,4 @@

echo Press any key to exit; read -rsn 1; exit'
# Create a new tab explicitly in iTerm2.
ttab -a iTerm2 echo "Hi from iTerm2."

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

"private": false,
"version": "0.3.1",
"version": "0.4.0",
"os": [

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

@@ -8,3 +8,3 @@ [![npm version](https://img.shields.io/npm/v/ttab.svg)](https://npmjs.com/package/ttab) [![license](https://img.shields.io/npm/l/ttab.svg)](https://github.com/mklement0/ttab/blob/master/LICENSE.md)

- [ttab &mdash; open a new Terminal.app / iTerm.app tab or window](#ttab-&mdash-open-a-new-terminalapp--itermapp-tab-or-window)
- [ttab &mdash; open a new Terminal.app / iTerm2.app tab or window](#ttab-&mdash-open-a-new-terminalapp--iterm2app-tab-or-window)
- [Installation](#installation)

@@ -23,8 +23,8 @@ - [Installation from the npm registry](#installation-from-the-npm-registry)

# ttab &mdash; open a new Terminal.app / iTerm.app tab or window
# ttab &mdash; open a new Terminal.app / iTerm2.app tab or window
An [OS X](https://www.apple.com/osx/) CLI for programmatically opening a new terminal tab/window in the standard terminal application, `Terminal.app`,
or in popular alternative [`iTerm.app`](http://www.iterm2.com/), optionally with a command to execute and/or a specific title and specific display settings.
An [OS X](https://www.apple.com/osx/) CLI for programmatically opening a new terminal tab/window in the standard terminal application, `Terminal`,
or in popular alternative [`iTerm2`](http://www.iterm2.com/), optionally with a command to execute and/or a specific title and specific display settings.
Note: `iTerm.app` support is experimental in that it is currently not covered by the automated tests run before every release.
Note: `iTerm2` support is experimental in that it is currently not covered by the automated tests run before every release.

@@ -34,3 +34,3 @@

**Important**: Irrespective of installation method, `Terminal.app` / `iTerm.app` needs to be granted _access for assistive devices_ in order for `ttab` to function properly, which is a _one-time operation that requires administrative privileges_.
**Important**: Irrespective of installation method, `Terminal` / `iTerm2` (`iTerm.app`) needs to be granted _access for assistive devices_ in order for `ttab` to function properly, which is a _one-time operation that requires administrative privileges_.
If you're not prompted on first run and get an error message instead, go to `System Preferences > Security & Privacy`, tab `Privacy`, select `Accessibility`, unlock, and make sure `Terminal.app` / `iTerm.app` is in the list on the right and has a checkmark.

@@ -83,2 +83,5 @@ For more information, see [Apple's support article on the subject](https://support.apple.com/en-us/HT202802)

ttab eval 'ls "$HOME/Library/Application Support"; echo Press a key to exit.; read -rsn 1; exit'
# Open a new tab in iTerm2 (if installed).
ttab -a iTerm2 echo 'Hi from iTerm2.'
```

@@ -96,3 +99,3 @@

Opens a new terminal tab or window in OS X's Terminal application or iTerm.
Opens a new terminal tab or window in OS X's Terminal application or iTerm2.

@@ -107,2 +110,3 @@ ttab [-w] [-s <settings>] [-t <title>] [-g|-G] [-d <dir>] [<cmd> [<arg>...]]

-d <dir> specify working directory
-a Terminal|iTerm2 open tab or window in Terminal.app / iTerm2
<cmd> [<arg>...] command to execute in the new tab

@@ -145,2 +149,9 @@

* **[v0.4.0](https://github.com/mklement0/ttab/compare/v0.3.1...v0.4.0)** (2016-09-13):
* [enhancement] `-a Terminal|iTerm2` now allows specifying the target Terminal
application, which is useful for launching `ttab` from non-terminal applications
such as [Alfred](http://alfredapp.com).
* [fix] Specifying a syntactically invalid shell command to execute in the
new tab now causes `ttab` to report a nonzero exit code.
* **[v0.3.1](https://github.com/mklement0/ttab/compare/v0.3.0...v0.3.1)** (2016-06-03):

@@ -147,0 +158,0 @@ * [enhancement] Support for iTerm2 v3 added (whose AppleScript syntax changed fundamentally)

Sorry, the diff of this file is not supported yet

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