-
Notifications
You must be signed in to change notification settings - Fork 3.1k
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
cmdline: add listconfig/helpconfig #9034
base: master
Are you sure you want to change the base?
Conversation
These commands should not require a running daemon, but currently require either a running daemon or an explicit |
minor nitpick: |
The |
async def helpconfig(self, key, more=False): | ||
"""Returns help about a configuration variable. """ | ||
cv = self.config.cv.from_key(key) | ||
return cv.get_long_desc() if more else cv.get_short_desc() |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I am not sure we need the --more
option. How about combining the two descriptions?
e.g.:
async def helpconfig(self, key, more=False): | |
"""Returns help about a configuration variable. """ | |
cv = self.config.cv.from_key(key) | |
return cv.get_long_desc() if more else cv.get_short_desc() | |
async def helpconfig(self, key): | |
"""Returns help about a configuration variable. """ | |
cv = self.config.cv.from_key(key) | |
short = cv.get_short_desc() | |
long = cv.get_long_desc() | |
if short and long: | |
return short + "\n---\n\n" + long | |
else: | |
return short or long |
This adds commands to view the list of config variables