For an example, I am in the directory Desktop
. I then do cd break
and when I list all files in break, i have for example main.cpp
file. I am trying to be able to go straight from Desktop to opening up main.cpp
using sublime text(using subl
to open it) without getting to break
then doing subl main.cpp
but can't seem to figure it out. This is what I want to do:
/Desktop $ cd break/subl main.cpp
but obviously that won't work. How do I do this and combine everything into one command?
subl break/main.cpp
? Or, to explain more clearly, put the command you use to open the file at the start of the path. – Zanna♦ Jan 12 '17 at 7:36cd
into folder, you can specify full path. If you need tocd
somewhere that is very deep into directory tree, just make a bash function and place it into.bashrc
or make a symlink to that directory. Just friendly advice – Sergiy Kolodyazhnyy Jan 12 '17 at 7:43