快速切換目錄軟件推薦——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