Ask HN:文件系统书签在您的 Shell 工作流中有用吗?
3 分•作者: manux81•3 个月前
我正在试验一个用于文件系统书签的小型 Shell 工具,我想了解一下这是否是其他人也遇到的问题。
这个想法是为目录定义持久或临时的书签:
```
bm add work ~/Work
bm temp build /tmp/build
```
然后直接在路径中使用它们:
```
cd @work
ls @work/project
```
该工具还将支持重命名书签、将临时书签提升为持久书签、降级它们以及清除临时书签。
我暂时还不分享实现。在这个阶段,我主要想了解其他人目前是如何处理这个问题的:
* 您是使用别名、环境变量、Shell 函数、z、autojump,还是其他方法?
* 像 @work 这样的显式名称有用吗,还是会感觉多余?
* 临时书签在实际工作流程中有用吗?
* 它需要提供什么才能值得替代现有的目录跳转工具?
查看原文
I’m experimenting with a small shell utility for filesystem bookmarks, and I’d like to understand whether this is a problem other people have.<p>The idea is to define persistent or temporary bookmarks for directories:<p>```
bm add work ~/Work
bm temp build /tmp/build
```<p>and then use them directly in paths:<p>```
cd @work
ls @work/project
```<p>The utility would also support renaming bookmarks, promoting temporary bookmarks to persistent ones, demoting them, and clearing temporary bookmarks.<p>I’m not sharing the implementation yet. At this stage, I’m mainly interested in how other people handle this today:<p>* Do you use aliases, environment variables, shell functions, z, autojump, or something else?
* Would explicit names such as @work be useful, or would they feel redundant?
* Would temporary bookmarks be useful in real workflows?
* What would this need to offer to be worth using instead of existing directory-jumping tools?