我想经常在完全不相关的路径中的目录之间切换,例如/Project/Warnest/docs/和~/Dropbox/Projects/ds/test/。
/Project/Warnest/docs/
~/Dropbox/Projects/ds/test/
但我不想一直打字cd /[full-path]/。是否有任何快捷命令可以切换到以前工作过的目录?
cd /[full-path]/
我能想到的一种解决方案是将环境变量添加到我bash .profile的常用目录中,cd并使用这些变量添加到它们中。
bash
.profile
cd
但是有没有其他解决办法呢?
command-line shell bash alias cd-command
cd -可以移动到上次访问的目录。除了上一篇之外,我们还能参观更多的历史吗?
cd -
shell bash zsh cd-command pushd
bash ×2
cd-command ×2
shell ×2
alias ×1
command-line ×1
pushd ×1
zsh ×1