diff options
Diffstat (limited to 'autosync/__init__.py')
| -rw-r--r-- | autosync/__init__.py | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/autosync/__init__.py b/autosync/__init__.py index df899c7..0ef4705 100644 --- a/autosync/__init__.py +++ b/autosync/__init__.py @@ -93,11 +93,11 @@ def run(): if firstArg.startswith("@@"): # list available entries for tabfile elts = list(sorted(getTab(name=firstArg.lstrip("@")))) - maxLenName = max(len(line[0]) for line in elts) - maxLenSrc = max(len(line[1]) for line in elts) - maxLenDst = max(len(line[1]) for line in elts) - msg("Available entries for tabfile {}:".format((lambda i: ["default", i][len(i)>0])(firstArg.lstrip("@")))) + maxLenName = max(len(line[0]) for line in elts+["Name"]) + maxLenSrc = max(len(line[1]) for line in elts+["Source"]) + maxLenDst = max(len(line[2]) for line in elts+["Target"]) + print("\n\033[1;37m%-*s %-*s %-*s\033[0m" % (maxLenName, "Name", maxLenSrc, "Source", maxLenDst, "Target")) for ename, esrc, edst in elts: print("%-*s %-*s %-*s" % (maxLenName, ename, maxLenSrc, esrc, maxLenDst, edst)) |
