[英]Efficienty `cd' into programming workspace
My directory structure for all things programming is currently like this - 我用于所有编程的目录结构当前是这样的-
The folders are under this directory: 文件夹位于此目录下:
/home/borax12/programming
-android
-java
-GoogleApps
It is a pain to every time cd
to this directory for any programming. 每次对任何程序进行
cd
到此目录时 ,这都是一件痛苦的事情 。 So I wanted to know whats the best practice to access your programming documents efficiently. 因此,我想知道有效访问编程文档的最佳实践是什么。
I was of the opinion to create symlinks to all those folders, but I don't want my home folder to look cluttered. 我认为要为所有这些文件夹创建符号链接 ,但是我不希望主文件夹看起来很混乱。
Even if I make symlinks, can I hide them somehow? 即使创建符号链接,我也可以以某种方式隐藏它们吗?
You could use aliases (put them in your ~/.bashrc
): 您可以使用别名(将它们放入
~/.bashrc
):
alias ,p='cd /home/borax12/programming'
alias ,pj='cd /home/borax12/programming/java'
alias ,pa='cd /home/borax12/programming/android'
So these aliases start with commas, and keep you 3-4 characters away from code. 因此,这些别名以逗号开头,并使您与代码保持3-4个字符的距离。
,p<CR>
And then there is autojump
for overall cd
goodness (written by, IIRC, a StackOverflow user). 然后是自动
autojump
以提高总体cd
品质(由StackOverflow用户IIRC编写)。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.