Nice to meet you, this is MJ! This is Qiita's first post! Isn't it troublesome to move between folders when developing with LINUX? Perhaps most people find it a hassle. Specifically, what kind of situation is it?
home
├ task ─ app
├ task2 ├ Controller
├ Model
├ View
For example, suppose you have a folder hierarchy like this.
cd /home/task/app/Controller
cd /home/task/app/Model
You have to enter the command like this every time. This time, I will write a method to greatly reduce this troublesome work with just one effort!
home
├ task ─ ─ ─ ─ ─ ─app
├ task2 ├ Controller
├ .bash_profile ├ Model
├ View
Create a .bash_profile file in a hierarchy shallower than the project file you are using.
/home
vi .bash_profile
.bash_profile
alias cont='cd ~/home/task/app/Controller'
alias model='cd ~/home/task/app/Model'
alias web='vi ~/home/task/app/Controller/abcController.php'
By writing like this, if you type cont, you can execute the command on the right side of = and go to the controller file. In short, write the abbreviated name on the left and the command you want to execute on the right! After writing the command, execute the following command in the folder where .bash_profile is located.
source .bash_profile
That's it! By the way, don't forget to execute the last source command every time you log in!
I'll leave it around here this time! It's hard to understand in the first post, but thank you for reading! I would like to continue posting in the future!
Recommended Posts