macOS 12 Montereyにはショートカットアプリに保存したショートカットをターミナルから実行できる「shortcuts」コマンドが追加。

macOS 12 Montereyのshortcutsコマンド macOS 12 Monterey
記事内に広告が含まれています。
スポンサーリンク
スポンサーリンク
スポンサーリンク

 macOS 12 Montereyにはショートカットアプリに保存したショートカットをターミナルから実行できる「shortcuts」コマンドが追加されています。詳細は以下から。

ターミナルアイコン

 Appleが日本時間2021年10月26日にリリースしたmacOS 12 Montereyには、iOS/iPadOSと同じく複数のアクションをワンクリックで実行できるショートカットを作成/管理するショートカットアプリが追加されていますが、

macOS 12 Montereyのショートカットアプリ

同じくmacOS Montereyには、このショートカットアプリで作成/管理しているショートカットをターミナルから実行できる”shortcuts”コマンドが”/usr/bin”に追加されています。

macOS 12 Montereyのshortcutsコマンド

shortcutsコマンド

 shortcutsコマンドからはショートカットアプリに保存されているショートカットの実行”run”や表示”list”、ショートカットをショートカットエディタで開く”view”、署名”sign”のサブコマンドが用意されており、ターミナルやスクリプトから任意のショートカットを実行できるようになっているので、ショートカット好きの方はチェックしてみてください。

ターミナルからBluetoothをOFFにするショートカットを実行。

shortcuts

$shortcuts --help
OVERVIEW: Command-line utility for running shortcuts.

USAGE: shortcuts 

OPTIONS:
  -h, --help              Show help information.

SUBCOMMANDS:
  run                     Run a shortcut.
  list                    List your shortcuts.
  view                    View a shortcut in Shortcuts.
  sign                    Sign a shortcut file.

  See 'shortcuts help ' for detailed help.

shortcuts runのヘルプ

$shortcuts help run      
OVERVIEW: Run a shortcut.

USAGE: shortcuts run  [--input-path  ...] [--output-path ] [--output-type ]

ARGUMENTS:
           The shortcut name to run. 

OPTIONS:
  -i, --input-path 
                          The input to provide to the shortcut. 
  -o, --output-path 
                          Where to write the shortcut output, if applicable. 
  --output-type 
                          What type to output data in, in Universal Type
                          Identifier format. 
  -h, --help              Show help information.

コメント

タイトルとURLをコピーしました