1
0
mirror of https://github.com/deadc0de6/dotdrop.git synced 2026-02-08 11:59:16 +00:00

fix tests

This commit is contained in:
deadc0de6
2019-11-27 20:10:13 +01:00
parent d63424e793
commit 28f39ad0ab
6 changed files with 41 additions and 40 deletions

View File

@@ -410,9 +410,12 @@ def cmd_list_profiles(o):
"""list all profiles"""
LOG.emph('Available profile(s):\n')
for p in o.profiles:
LOG.sub(p.key, end='')
LOG.log(' ({} dotfiles)'.format(len(p.dotfiles)))
#LOG.sub('{} ({} dotfile(s))'.format(p.key, len(p.dotfiles)))
if o.profiles_grepable:
fmt = '{}'.format(p.key)
LOG.raw(fmt)
else:
LOG.sub(p.key, end='')
LOG.log(' ({} dotfiles)'.format(len(p.dotfiles)))
LOG.log('')
@@ -430,10 +433,16 @@ def cmd_list_files(o):
src = os.path.join(o.dotpath, dotfile.src)
if not Templategen.is_template(src):
continue
LOG.log('{}'.format(dotfile.key), bold=True)
LOG.sub('dst: {}'.format(dotfile.dst))
LOG.sub('src: {}'.format(dotfile.src))
LOG.sub('link: {}'.format(dotfile.link.name.lower()))
if o.files_grepable:
fmt = '{},dst:{},src:{},link:{}'
fmt = fmt.format(dotfile.key, dotfile.dst,
dotfile.src, dotfile.link.name.lower())
LOG.raw(fmt)
else:
LOG.log('{}'.format(dotfile.key), bold=True)
LOG.sub('dst: {}'.format(dotfile.dst))
LOG.sub('src: {}'.format(dotfile.src))
LOG.sub('link: {}'.format(dotfile.link.name.lower()))
LOG.log('')

View File

@@ -59,9 +59,9 @@ Usage:
dotdrop update [-VbfdkP] [-c <path>] [-p <profile>]
[-i <pattern>...] [<path>...]
dotdrop remove [-Vbfdk] [-c <path>] [-p <profile>] [<path>...]
dotdrop files [-VbT] [-c <path>] [-p <profile>]
dotdrop files [-VbTG] [-c <path>] [-p <profile>]
dotdrop detail [-Vb] [-c <path>] [-p <profile>] [<key>...]
dotdrop profiles [-Vb] [-c <path>]
dotdrop profiles [-VbG] [-c <path>]
dotdrop --help
dotdrop --version
@@ -83,6 +83,7 @@ Options:
-V --verbose Be verbose.
-d --dry Dry run.
-b --no-banner Do not display the banner.
-G --grepable Grepable output.
-v --version Show version.
-h --help Show this screen.
""".format(BANNER, PROFILE)
@@ -214,6 +215,9 @@ class Options(AttrMonitor):
# "files" specifics
self.files_templateonly = self.args['--template']
self.files_grepable = self.args['--grepable']
# "profiles" specifics
self.profiles_grepable = self.args['--grepable']
# "install" specifics
self.install_force_action = self.args['--force-actions']
self.install_temporary = self.args['--temp']