4 ms·
yep. I know about the -- way of specifying the args. I'm not saying that we can't do better with existing tools, just that we don't do better.
by kmdupree 7y ago
yep. I know about the -- way of specifying the args. I'm not saying that we can't do better with existing tools, just that we don't do better.
- chubot 7y agoI think your post is conflating two questions: (1) Whether tools support long options, and (2) Whether script authors use long options And its claims about #1 seems inaccurate to me. I haven't seen any tools that support only short options in a LONG time. For example, try pip --help or virtualenv --help. Or any tool written in Go, or node.js, etc. I always support long options myself, e.g.: https://github.com/oilshell/oil/blob/master/test/sh_spec.py#L1045 https://github.com/oilshell/oil/blob/master/test/sh_spec.py#... The only case where you don't have long options if you're trying to limit yourself to POSIX, which not many people do, and which I don't recommend for this reason (among others). ----- I agree with the gist of your post regarding #2 -- people should use long options more. But there's very straightforward and actionable advice that can go at the very top. They don't have to wait for #1, because it already happened. You can and should just start using them in your bash scripts! You don't need to switch shells, switch languages, or even change the tools you use. Based on this thread, it DOES appear that many people are confused by this. I'm tempted to write my own blog post, which I may do. But honestly I think a tool that translates short options to long options would be a better solution -- i.e. advocacy through tools rather than advocacy through words. (e.g. "go fmt" seems to have done wonders for formatting without making people read style guides.) This should be pretty straightforward with the Oil parser [1] and I can use help if anyone cares enough :) [1] http://www.oilshell.org/blog/tags.html?tag=parsing-shell#parsing-shell http://www.oilshell.org/blog/tags.html?tag=parsing-shell#par...