Closed selaselah closed 3 years ago
I am not aware of this shell feature nor what you mean or what you expect.
How would you expect argh to behave? How does it behave now?
Please provide more details and references.
there is no standard in handling the "-"
cd -
goes to the last location, and has nothing to do with stdin/stdout
other program might implement "-" different , depending on what is useful for the program.
I don't know if a single -
as argument would work with argh to give it a meaning implemented self, depending on the program I would implement.
I am not aware of this shell feature nor what you mean or what you expect. How would you expect argh to behave? How does it behave now? Please provide more details and references.
'-' should parse as pos_arg args after '--' parse as pos_arg
This is argh behavior vs python's argparse (same as many shell command) package's: | argv | argh.flags | argh.pos_arg | argparse.flags | argparse.pos_arg |
---|---|---|---|---|---|
- | - | - | |||
- - | - - | - - | |||
inp - | - | inp | inp - | ||
- out | - | out | - out | ||
-- -b | -- b | -b | |||
-b -- | -- b | -b |
This goes against the minimalist and simple spirit of the library. Argh does not care how many dashes you use (except for the case when specifying SINGLE_DASH_ISMULTIFLAG ). 🤷 ¯_(ツ)/¯
in shell, '-' means stdin/stdout and very useful, eg echo hello | cat - world.txt
but argh will ignore it