macos

package
v0.11.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Aug 31, 2026 License: MIT Imports: 4 Imported by: 0

Documentation

Overview

Package macos opens tabs in the macOS Terminal.app via AppleScript.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func OpenTab

func OpenTab(workDir, command string) error

OpenTab opens a new Terminal.app tab (or a new window if none exist) and runs the given command.

Terminal has no AppleScript "create tab" command. Since High Sierra each tab is also its own AppleScript window (`count of tabs of front window` is 1), so `do script … in front window` reuses the current tab and `do script` with no target opens a real window. New tabs are created by clicking Shell → New Tab (same approach as ttab); if that fails, we open a window.

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL