如题,比如 我想 设定一个路径 /workplace/rails/agile_web_dev_rails/dept 为一个常量,这样每次进入终端就不用敲很长的路径名了
在.bash_profile 里 export xx='/workplace/rails/agile_web_dev_rails/dept' 在终端 cd $xx
export xx='/workplace/rails/agile_web_dev_rails/dept'
cd $xx
z - jump around DESCRIPTION Tracks your most used directories, based on 'frecency'.
After a short learning phase, z will take you to the most 'frecent' directory that matches ALL of the regexes given on the command line.
用 autojump
同上~ 用 autojump, 直接j your_favorite_dir 就可以到你想要的目录
j your_favorite_dir
#3 楼 @googya #4 楼 @huhongda j 命令怎么 command not found,是不是需要配置别名?
#4 楼 @huhongda #3 楼 @googya 我输入 j app(app 就是当前目录下) autojump: directory 'app' not found 是个什么原因?
alias ww='cd /workplace/rails/agile_web_dev_rails/dept'
#7 楼 @42thcoder 哈哈哈~你这个真好~
#4 楼 @huhongda #3 楼 @googya 这个是自学习的吧?
@shangrenzhidao brew install autojump
brew install autojump
vim ~/.bashrc or vim ~/.zshrc [[ -sbrew --prefix/etc/autojump.sh ]] && .brew --prefix/etc/autojump.sh
[[ -s
/etc/autojump.sh ]] && .
/etc/autojump.sh
使用: j your_directory
j your_directory