快速切换目录软件推荐——autojump


受到《autojump: 在命令行下快速更改目录》的鼓动,决定试用下这个软件。

但ubuntu下的源貌似有些问题,

sudo apt get install autojump

 后,死活提示j命令无法找到。

无奈只能手动安装。

官方的地址为

https://github.com/joelthelion/autojump

 

git clone https://github.com/joelthelion/autojump.git

进入clone的目录,执行

./install.sh

其会在~/目录下建立.autojump文件夹。

最后其会有提示

如果你是zsh,添加如下到 ~/.zshrc

[[ -s ~/.autojump/etc/profile.d/autojump.zsh ]] && . ~/.autojump/etc/profile.d/autojump.zsh

 如果你是bash,则添加如下到 ~/.bashrc

[[ -s ~/.autojump/etc/profile.d/autojump.bash ]] && . ~/.autojump/etc/profile.d/autojump.bash

即可。

重新加载shell 配置文件

. ~/.zshrc
或者
~/.bashrc

 然后就可以输入

j dst_dir 了

当然,由于autojump是基于数据库记录的,只有你敲击有了记录,才能正常使用。

要知道各个目录的权重,可以输入

j --stat

 


免责声明!

本站转载的文章为个人学习借鉴使用,本站对版权不负任何法律责任。如果侵犯了您的隐私权益,请联系本站邮箱yoyou2525@163.com删除。



 
粤ICP备18138465号  © 2018-2025 CODEPRJ.COM