summaryrefslogtreecommitdiff
path: root/example.py
diff options
context:
space:
mode:
authorLars Wirzenius <liw@liw.fi>2011-03-31 17:52:50 +0100
committerLars Wirzenius <liw@liw.fi>2011-03-31 17:52:50 +0100
commitf28c5b190d85cbaece08f3991eb4470ab757e7b0 (patch)
tree92965b6e7c773cb715f56ccf736f341c32d217af /example.py
parentf8ae07c23126d631ceec4881a722a197ccdcd36a (diff)
downloadcliapp-f28c5b190d85cbaece08f3991eb4470ab757e7b0.tar.gz
Add way to set metavar= for option parser.
This allows prettier --help output.
Diffstat (limited to 'example.py')
-rw-r--r--example.py3
1 files changed, 2 insertions, 1 deletions
diff --git a/example.py b/example.py
index 6182cc5..3849442 100644
--- a/example.py
+++ b/example.py
@@ -30,7 +30,8 @@ class ExampleApp(cliapp.Application):
def add_settings(self):
self.settings.add_string_list_setting(['pattern', 'e'],
- 'pattern to search for')
+ 'search for regular expression PATTERN',
+ metavar='REGEXP')
# We override process_inputs to be able to do something after the last
# input line.