0

I was wondering how can I open a index.html file from terminal. For example, I know with sublime works like this:

sublime index.html

but for textWrangler? And in general, how can I find these commands like "sublime" for whatever program I chose. Thanks I am using OSX.

tonhwk
  • 1
  • 4
  • 1
    Here is a similar questions, hope this should help you: https://apple.stackexchange.com/questions/9587/how-can-i-open-a-text-file-with-textwrangler-from-the-terminal-command-line – Niamul Nov 06 '17 at 02:15
  • @Antonio See my comment below – Akinjide Feb 15 '18 at 21:42

1 Answers1

0

For TextWrangler access in terminal I use the open command:

# opens index.html in TextWrangler
open index.html -a 'TextWrangler'

# opens CWD in TextWrangler
open . -a 'TextWrangler'

# alternative, add alias for TextWrangler in .bashrc or .zshrc
alias code="open ${1: .} -a 'TextWrangler'"

# then open index.html or CWD (current working directory)
code index.html
code

Hope this helps.

Akinjide
  • 2,723
  • 22
  • 28