How do I launch brackets.io from MacOS 10.12 (Sierra) terminal?
Asked Answered
M

6

7

I'm having problem launching brackets.io from terminal on MacOS Sierra.

 brackets filename.ext

Gives:

-bash: brackets: command not found

Anyone know what I need to configure to make this happen?

Microdont answered 23/8, 2017 at 21:51 Comment(1)
FYI see their wikiDawdle
M
13
  1. Open Bracket editor
  2. Go to file menu and the go to Install Command Line Shortcut

There you have it, to test it go to the terminal and test it

Madera answered 30/6, 2018 at 20:12 Comment(0)
C
4
  1. Go to terminal.
  2. type open -a brackets filename.ext
Cresa answered 8/7, 2018 at 12:33 Comment(0)
L
2

Open Brackets Application: Mac: Select File > Install Command Line Shortcut in Brackets Windows: When installing Brackets, ensure Add "brackets" launcher to PATH for command line use is checked off

Examples

Open a file in the current folder, without switching projects: brackets index.html

Open two files from a specific path, without switching projects: brackets ~/Sites/index.html ~/Sites/index.css

Open the current folder as a project in Brackets: brackets .

Open a specific folder as a project in Brackets: brackets ~/Sites/mysite

Source: https://github.com/adobe/brackets/wiki/Command-Line-Arguments

Levina answered 20/4, 2019 at 2:24 Comment(0)
D
1

You can do what is called "creating an alias".
Open your .profile with the editor of your choice. f.e.

pico ~/.profile

or with Brackets like this:

open -a /Applications/Brackets.app/ ~/.profile

and add

alias brackets='open -a /Applications/Brackets.app/

to that file.
save.
close.
done.

Doze answered 20/12, 2017 at 12:54 Comment(0)
J
0

First, make a custom command for this by opening your bash_profile and putting in the following code:

function brackets() {
    open -a brackets $1
}

Now you can open files and folders in brackets by opening a new terminal window and typing:

brackets <file or folder name> 
Jarboe answered 16/11, 2020 at 15:53 Comment(0)
G
0

MacOS 10.15 or greater with zsh

Mac now uses zsh instead of bash, and the GUI option mentioned at https://mcmap.net/q/1405654/-how-do-i-launch-brackets-io-from-macos-10-12-sierra-terminal only adds it to the bash path as of Brackets 1.14. But you can just add it to your PATH manually by adding to:

~/.zprofile

the line:

PATH="$PATH:/usr/local/bin/
Gander answered 30/12, 2020 at 12:7 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.