cx: 路径跳转工具
常用的路径列表,配置跳转行为
🕐
🔗
项目主页: https://github.com/aric-go/cx
安装
编译的命令行为 cxc
# clone
git clone https://github.com/aric-go/cx
# build + link
cd ~/aric-go/cx
npm run build
npm run bin:link本地配置
alias cx="cxc && source ~/.config/cx/boot.sh"难点
- golang 的命令行,并不能完成真实的跳转,因为属于 shell 子命令
- 所以,cxc 只是真实的产生一个 ~/.config/cx/boot.sh 文件
- cxc 选择列表
- 得到值之后,写入到这个 boot.sh 中
- 值为这样:
cd ~/aric-tpls - 真实的 cx 会使用 source ~/.config/cx/boot.sh 方式完成真实的跳转
- 所以,最终的 cx 必须是 shell 命令
alias cx="cxc && source ~/.config/cx/boot.sh"