TE
科技回声
首页24小时热榜最新最佳问答展示工作
GitHubTwitter
首页

科技回声

基于 Next.js 构建的科技新闻平台,提供全球科技新闻和讨论内容。

GitHubTwitter

首页

首页最新最佳问答展示工作

资源链接

HackerNews API原版 HackerNewsNext.js

© 2025 科技回声. 版权所有。

Show HN: Aos – Alias on Steroids

2 点作者 todoesverso9 个月前
A simple golang cli to run complex command lines in a simpler way

1 comment

sweeter9 个月前
Instead of only allowing flags to be passed by an environment variable, consider using sub-commands or passing a double-dash to stop parsing for the main CLI tool. ie:<p>``` aos --config .&#x2F;blah.yml -- my_alias -i input.mp4 -o output.gif<p># or<p>aos exec mv $x $y<p>```<p>forcing the user to specify a config file each time you run the command is also a bad design. Create a list of acceptable paths (including $PWD), iterate over them looking for a config, and then allow a &quot;--config&quot; flag to have precedence over any default path.<p>as of now you have to specify an env var in lieu of passing flags to the tool AND you have to specify a config file. At that point it is just easier to use shell functions or scripts.<p>check out &quot;jessevdk&#x2F;go-flags&quot; you can do the env var thing, pass with flags and subcmds and honor the double dash to stop parsing. Its real straightforward.