Answer the question
In order to leave comments, you need to log in
How to create your command in the console?
Want Want want!
I want to run local sites with my own team.
I have Galp, now the command is used:
cd public_html/sitename.loc/ && atom . && gulp watch
siteloc sitename start
Answer the question
In order to leave comments, you need to log in
It's strange that no one suggested the easiest and, in my opinion, the most suitable way for this case - create a function in .bashrc
paste these lines at the end of the ~/.bashrc file
function siteloc() {
# выйти если нет аргумента
[ -n "$1" ] || return 1
cd "$HOME/public_html/$1.loc"
atom .
gulp watch
}
source ~/.bashrc
for the changes to take effect. siteloc sitename
"$HOME/public_html/$1.loc"
.
look in /etc/init.d - there are scripts that start services. You want to make an analog.
If a single command without parameters like "siteloc-sitename-start" works, then google towards bash alias. If you need a service with parameters, then you need to do an init / systemd script.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question