archlinux / asp

Arch Build Source Management Tool
MIT License
294 stars 34 forks source link

add long options #30

Closed ThePiGrepper closed 11 months ago

ThePiGrepper commented 5 years ago
falconindy commented 5 years ago

You'll want to update the manpage and the shell completion scripts as well.

E5ten commented 5 years ago

But with the new change --arch=i686 doesn't work now, and you can also do stuff like -f-arch i686 or -f -arch i686 (an issue with anything that tries to use getopts for longopts).

ThePiGrepper commented 5 years ago

well, regarding the first point, at first, --arch=i686 was enabled and I was told to disable it, so that's that. regarding the second point, hmm, well that's a inherent problem with getopts as you say, it would be nice to have something better available

falconindy commented 5 years ago

I didn't mean to suggest that --arch=i686 was invalid. Quite the opposite. It should be identical to --arch i686.

I'm really not seeing the point in doing this. I think the simpler solution is to:

1) Remove -f. It's used in only one place only (export), and it's usage is inconsistent, i.e. it could be used elsewhere but isn't. The value seems limited 2) Add explicit handling of --version and --help. 3) Tell people to suck it up about -a which is almost never needed.

ThePiGrepper commented 5 years ago

let's see:

  1. ok, I could do that if you want, on a different pull probably. it looks like a 5min task.
  2. when you say explicit, you mean out of the getopts and treated as another 'command'?
  3. that makes sense, however, reading the issue, it looks like he is explicitly wanting that. ofc, it's your call.
ThePiGrepper commented 5 years ago

oh, and originally, --arch=i686 was identical to --arch i686. maybe I didnt quite understand your original request about removing it.

E5ten commented 5 years ago

@ThePiGrepper I think he meant you need to fail when --arch= alone was passed, not --arch=anything.

ThePiGrepper commented 5 years ago

that was already the case before I deleted that section.