diff options
author | Mattias Andrée <maandree@operamail.com> | 2013-06-18 14:04:57 +0200 |
---|---|---|
committer | Mattias Andrée <maandree@operamail.com> | 2013-06-18 14:04:57 +0200 |
commit | a19f0e31972c1f5f1f86a510ff845fc89fbfd8f5 (patch) | |
tree | 083fea835e78056fe960432466ee3d914122fea9 /src/argparser.py | |
parent | update gitignore with jar (diff) | |
download | argparser-a19f0e31972c1f5f1f86a510ff845fc89fbfd8f5.tar.gz argparser-a19f0e31972c1f5f1f86a510ff845fc89fbfd8f5.tar.bz2 argparser-a19f0e31972c1f5f1f86a510ff845fc89fbfd8f5.tar.xz |
m
Signed-off-by: Mattias Andrée <maandree@operamail.com>
Diffstat (limited to '')
-rw-r--r-- | src/argparser.py | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/argparser.py b/src/argparser.py index 330e08d..18a8899 100644 --- a/src/argparser.py +++ b/src/argparser.py @@ -428,7 +428,7 @@ class ArgParser(): alts[0] += ' ' * (maxfirstlen - len(alts[0])) for opt_alt in alts: if opt_alt is alts[-1]: - line += '%colour%' + opt_alt + line += '\0' + opt_alt l += len(opt_alt) if opt_type == ArgParser.ARGUMENTED: line += ' \033[04m%s\033[24m' % (opt_arg); l += len(opt_arg) + 1 elif opt_type == ArgParser.VARIADIC: line += ' [\033[04m%s\033[24m...]' % (opt_arg); l += len(opt_arg) + 6 @@ -447,7 +447,7 @@ class ArgParser(): continue first = True colour = '36' if (index & 1) == 0 else '34' - self.__print(lines[index].replace('%colour%', '\033[%s;01m' % (colour)), end=' ' * (col - lens[index])) + self.__print(lines[index].replace('\0', '\033[%s;01m' % (colour)), end=' ' * (col - lens[index])) for line in opt_help.split('\n'): if first: first = False |