Opened 10 years ago

Closed 10 years ago

Last modified 9 years ago

#7972 closed (invalid)

allow argv options anywhere on command line

Reported by: mukappa Owned by: nobody
Component: Core (Management commands) Version: master
Severity: Keywords:
Cc: Triage Stage: Unreviewed
Has patch: yes Needs documentation: no
Needs tests: no Patch needs improvement: no
Easy pickings: UI/UX:


I don't like having to remember exactly where --settings=xxx goes.

Attachments (1)

argvorder.diff (2.8 KB) - added by mukappa 10 years ago.

Download all attachments as: .zip

Change History (4)

Changed 10 years ago by mukappa

Attachment: argvorder.diff added

comment:1 Changed 10 years ago by Russell Keith-Magee

Resolution: invalid
Status: newclosed

I don't like bug reports that don't explain what the problem is.

comment:2 Changed 9 years ago by mukappa

from the following command lines are all equivalent

<yourscript> -f outfile --quiet
<yourscript> --quiet --file outfile
<yourscript> -q -foutfile
<yourscript> -qfoutfile

I think that implies

$ python --settings=settings shell


$ python shell --settings=settings

are equivalent.

but for (and

$ python --settings=settings shell
Unknown command: '--settings=settings' cares where its options are, but I don't see where it needs to. I sometimes put an option in the "wrong" place and find it frustrating to have to check the usage.


comment:3 Changed 9 years ago by mukappa

Sorry, my brain saw what it wanted to see, not what was there in the excerpt from the optparse doc.

Nonetheless, optparse allows mixing options anywhere between and around args, and I'll leave it at that.

Note: See TracTickets for help on using tickets.
Back to Top