Opened 3 years ago

Closed 3 years ago

#15541 closed defect (worksforme)

'tor --dump-config' without an opt should provide usage information

Reported by: atagar Owned by: rl1987
Priority: Very Low Milestone: Tor: 0.2.7.x-final
Component: Core Tor/Tor Version:
Severity: Keywords:
Cc: Actual Points:
Parent ID: Points:
Reviewer: Sponsor:

Description

From #14742, 'tor --dump-config' should provide usage information when no arguments are provided. Presently I guess it's just a no-op which is confusing.

atagar@odin:~/Desktop/stem$ tor --dump-config
atagar@odin:~/Desktop/stem$ tor --dump-config short
DataDirectory /home/atagar/.tor

Child Tickets

Change History (7)

comment:1 Changed 3 years ago by atagar

Actually, it's related to --dump-config so I'll include another bit on this ticket...

'tor --dump-config [invalid_option]' gives usage information, but doesn't end with a newline.

atagar@odin:~/Desktop/stem$ tor --dump-config foobar
foobar is not a recognized argument to --dump-config. Please select 'short', 'non-builtin', or 'full'atagar@odin:~/Desktop/stem$ 

comment:2 Changed 3 years ago by rl1987

Owner: set to rl1987
Status: newaccepted

comment:3 Changed 3 years ago by rl1987

Status: acceptedneeds_review

comment:4 Changed 3 years ago by atagar

Nice! Out of curiosity why not swap the other entries to the enum? Might make it more readable, in addition to uniform...

 { "--hash-password", 1 },
- { "--dump-config", 1 },
+ { "--dump-config", ARGUMENT_OPTIONAL },
{ "--list-fingerprint", 0 },
{ "--verify-config", 0 },

comment:5 Changed 3 years ago by rl1987

Pushed one more commit that implements this.

comment:6 Changed 3 years ago by nickm

Milestone: Tor: 0.2.7.x-final

comment:7 Changed 3 years ago by nickm

Resolution: worksforme
Status: needs_reviewclosed

Squashed and merged!

Note: See TracTickets for help on using tickets.