Skip to content

Commit

Permalink
[config] Add '-h' and '-?' as help options to unify with show/sonic-c…
Browse files Browse the repository at this point in the history
…lear (sonic-net#647)
  • Loading branch information
jleveque authored Sep 18, 2019
1 parent e8f93c4 commit 23960e7
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion config/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,8 @@
import aaa
import mlnx

CONTEXT_SETTINGS = dict(help_option_names=['-h', '--help', '-?'])

SONIC_CFGGEN_PATH = '/usr/local/bin/sonic-cfggen'
SYSLOG_IDENTIFIER = "config"

Expand Down Expand Up @@ -386,8 +388,9 @@ def is_ipaddress(val):
return False
return True


# This is our main entrypoint - the main 'config' command
@click.group()
@click.group(context_settings=CONTEXT_SETTINGS)
def config():
"""SONiC command line - 'config' command"""
if os.geteuid() != 0:
Expand Down

0 comments on commit 23960e7

Please sign in to comment.