diff options
author | Sérgio Almeida <mephx.x@gmail.com> | 2009-08-17 16:45:58 +0100 |
---|---|---|
committer | Sérgio Almeida <mephx.x@gmail.com> | 2009-08-17 16:45:58 +0100 |
commit | 0bc662a176b7044fd6faba7fabb68f7abe9a2049 (patch) | |
tree | 9b5039006db998c53efdb4fab53efd26f5ee5f48 /uio.py | |
parent | Added support for targetless links aka *.d/ alike links (diff) | |
download | uselect-0bc662a176b7044fd6faba7fabb68f7abe9a2049.tar.gz uselect-0bc662a176b7044fd6faba7fabb68f7abe9a2049.tar.bz2 uselect-0bc662a176b7044fd6faba7fabb68f7abe9a2049.zip |
Added -global when root. Fixed broken global lynking
Diffstat (limited to 'uio.py')
-rw-r--r-- | uio.py | 9 |
1 files changed, 7 insertions, 2 deletions
@@ -20,6 +20,7 @@ bold = lime = red = reset = yellow = notice = '' error = warning = bullet = ok = highlight = '' verbose = False + class Counter: def __init__(self): @@ -31,6 +32,7 @@ class FileSystem: def __init__(self): """ FileSystem Contructor """ self.home = os.getenv('HOME') + self.set_global = False self.uid = pwd.getpwuid(os.getuid())[0] self.environment = self.home + '/.uselect/' @@ -309,10 +311,13 @@ class PrintSystem: def print_options(self): self.print_line(highlight + space + 'Options:' + reset) - self.print_table([ \ + table = [\ [bold + '-v', bullet + space + 'Verbose Mode'], \ [bold + '-nc', bullet + space + 'No Colors'], \ - [bold + '-version', bullet + space + 'Version Information']]) + [bold + '-version', bullet + space + 'Version Information']] + if filesystem.uid == 'root': + table.append([bold + '-global', bullet + space + 'Set Globally']) + self.print_table(table) class ProfilePrintSystem(PrintSystem): |