Commit ba3932ac by willmcgugan

Some tweaks to make colours consistent on commandline apps

parent bcf4f7e5
......@@ -47,7 +47,7 @@ Recursively display the contents of PATH in an ascii tree"""
max_levels = None
else:
max_levels = options.depth
self.output(args[0] + '\n')
self.output(self.wrap_dirname(args[0] + '\n'))
dircount, filecount = print_fs(fs, path or '',
file_out=self.output_file,
max_levels=max_levels,
......@@ -56,7 +56,7 @@ Recursively display the contents of PATH in an ascii tree"""
dirs_first=options.dirsfirst,
files_wildcard=options.pattern,
dirs_only=options.dirsonly)
self.output_file.write('\n')
self.output('\n')
def pluralize(one, many, count):
if count == 1:
return '%i %s' % (count, one)
......
......@@ -97,7 +97,7 @@ class Command(object):
def wrap_dirname(self, dirname):
if not self.terminal_colors:
return dirname
return '\x1b[1;32m%s\x1b[0m' % dirname
return '\x1b[1;34m%s\x1b[0m' % dirname
def wrap_error(self, msg):
if not self.terminal_colors:
......@@ -110,11 +110,11 @@ class Command(object):
return fname
if '://' in fname:
return fname
if '.' in fname:
name, ext = splitext(fname)
fname = u'%s\x1b[36m%s\x1b[0m' % (name, ext)
# if '.' in fname:
# name, ext = splitext(fname)
# fname = u'%s\x1b[36m%s\x1b[0m' % (name, ext)
if isdotfile(fname):
fname = u'\x1b[2m%s\x1b[0m' % fname
fname = '\x1b[33m%s\x1b[0m' % fname
return fname
def wrap_faded(self, text):
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment