jsvn: only turn on pager for listed subcomands instead of excluding listed subcommands

This commit is contained in:
Josh Holtrop 2012-02-22 09:52:09 -05:00
parent bd32fcb204
commit bd7afbf7fc

14
jsvn
View File

@ -562,11 +562,15 @@ def main(argv):
using_pager = False using_pager = False
using_color = sys.stdout.isatty() using_color = sys.stdout.isatty()
if sys.stdout.isatty(): if sys.stdout.isatty():
if not (len(argv) >= 1 and argv[0] in if (len(argv) >= 1 and argv[0] in
('checkout', 'co', ('blame', 'praise', 'annotate', 'ann',
'commit', 'ci', 'cat',
'propedit', 'pedit', 'pe', 'diff', 'di',
'update', 'up')): 'help',
'list', 'ls',
'log',
'propget', 'pget', 'pg',
'proplist', 'plist', 'pl')):
pager = 'less -FRX' pager = 'less -FRX'
if 'PAGER' in os.environ and os.environ['PAGER'] != '': if 'PAGER' in os.environ and os.environ['PAGER'] != '':
pager = os.environ['PAGER'] pager = os.environ['PAGER']