4 ms·
Don’t think it’s worth it. Looking at sudo’s man page at https://linux.die.net/man/8/sudo https://linux.die.net/man/8/sudo, it looks like sudo only uses single-
by telotortium 3y ago
Don’t think it’s worth it. Looking at sudo’s man page at https://linux.die.net/man/8/sudo https://linux.die.net/man/8/sudo, it looks like sudo only uses single-letter flags, some of which take arguments. Argh implements long options, built-in parsing, subcommands, and lots of other nice to have features that nevertheless add a lot of code. It’s normal in traditional UNIX C programs to parse sudo-style flags in a handful of lines without any external dependencies.
- 0cf8612b2e1e 3y agoI consider single letter flags only to be a mistake. There should almost always be a verbose double-dash option. I get it, most of the tooling which uses single letters is totally ossified due to backwards compatibility reasons. However, the sudors team is already breaking backwards compat. Now is the time to make a minor usability improvement.
- somat 3y agoI consider double-dashes to be a mistake. hell, after a few drinks and quiet thought I consider single dashes to be a mistake. Perhaps the dd arg=val form is actually the ideal argv method after all. What if getopt was all a huge mistake. And then I sober up and realize they are just dashes, useless but harmless, not a thing worth worrying about. And then you have the absolutely inane doubledash --arg=value format. Way to carry a bad idea to it's logical conclusion guys. somebody drunk their getopt kool-aid that morning. just get rid of the stupid dashes if you are going to do that.
- scbrg 3y agoThat's a bit dated. Both regular sudo (1.9.13p3) and sudo-rs (0.2.2) on my machine (Debian) support double dash style options.