Answer the question
In order to leave comments, you need to log in
How to spell alias correctly in Mac OS X?
Hello everyone, I'm trying to write Alias in .bash_prompt
, I write like this alias sublime='open the path to the program'
The program opens without any problems, but only when you need to open some additional file in this program, nothing comes out, I write like this ... Already using the sublime index.html alias, the following happens, the sublime text and index.html program opens in the browser. How can I fix this?
Answer the question
In order to leave comments, you need to log in
sub() { # Создаем функцию для открытия файла или папки в Саблайме
if [ -z "$1" ] # Если параметр пустой
then # То открываем в Саблайме текущую папку
open -a Sublime\ Text "$(pwd)"
else # Если не пустой, то открываем файл, который написали в параметре
open -a Sublime\ Text "$1"
fi
}
sub
- opens the current folder sub index.html
- opens a specific file
What the hell is all this?
We smoke.
https://www.sublimetext.com/docs/3/osx_command_lin...
Alias is not needed, CLI is already built into the sublime.
and write the variable to .bashrc if it doesn't work:export PATH=/usr/local/bin:$PATH
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question