Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add support for positional arguments #20

Closed
akamensky opened this issue Aug 1, 2018 · 4 comments · Fixed by #102
Closed

Add support for positional arguments #20

akamensky opened this issue Aug 1, 2018 · 4 comments · Fixed by #102

Comments

@akamensky
Copy link
Owner

For some tools it makes more sense to use positional arguments instead of randomly located named arguments. The positional arguments must work as follows:

  1. Positional arguments can be placed only after named arguments and cannot mixed up with them
  2. Positional arguments order should be clearly defined in the code (possibly by order in which they are added)
  3. Positional argument parsing should account for shell expansions (namely wildcard in path arguments, which expands to multiple arguments)
@jhughes1153
Copy link
Contributor

@akamensky I could try to take a stab at this, the other branch seems to have stalled for this

@akamensky
Copy link
Owner Author

@jhughes1153 would be great if you can take a shot at this one. You can see #38 comments about one possible implementation. If you do work on it, I'd suggest perhaps first write how you would go about implementing this as to make sure everyone on the same page. Thanks a bunch!

@jhughes1153
Copy link
Contributor

#38 seems like a reasonable approach, I think I should start with trying to get something along those lines to work and go from there

@hellflame
Copy link

Here I have to create another wheel for this, because the current project doesn't seem to have clear access to make upgrades (and the issue seem to h hang long enough). trust me I tried to upgrade the current project, but it easily become another brand new thing (modification across everywhere, take help function for example )

here is my version of approach https://github.com/hellflame/argparse

welcome to give any advice

by the way, my argparse also has solutions for

#73 and #70

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants