summaryrefslogtreecommitdiffstats
path: root/ogcli
diff options
context:
space:
mode:
Diffstat (limited to 'ogcli')
-rwxr-xr-xogcli4
1 files changed, 3 insertions, 1 deletions
diff --git a/ogcli b/ogcli
index fd6eade..abea632 100755
--- a/ogcli
+++ b/ogcli
@@ -34,7 +34,9 @@ class CLI():
self.ogcli = OgCLI(self.cfg)
parser = argparse.ArgumentParser(prog='ogcli')
- parser.add_argument('command', help='Subcommand to run')
+ parser.add_argument('command', help='Subcommand to run',
+ choices=[attr for attr in dir(self.ogcli)
+ if not str.startswith(attr, "_")])
args = parser.parse_args(sys.argv[1:2])
if not hasattr(self.ogcli, args.command):