From d88c9956c44bf0b14d69b506ac5db8c62d68a247 Mon Sep 17 00:00:00 2001 From: deadc0de6 Date: Fri, 8 Sep 2017 13:56:54 +0200 Subject: [PATCH] refactoring and update readme --- README.md | 27 ++++++++++++++++++++++++--- dotdrop/dotdrop.py | 2 +- 2 files changed, 25 insertions(+), 4 deletions(-) diff --git a/README.md b/README.md index 7059b95..130a8ff 100644 --- a/README.md +++ b/README.md @@ -139,15 +139,17 @@ For additional usage see the help: ``` $ ./dotdrop.sh --help + _ _ _ __| | ___ | |_ __| |_ __ ___ _ __ / _` |/ _ \| __/ _` | '__/ _ \| '_ | - \__,_|\___/ \__\__,_|_| \___/| .__/ v0.2 + \__,_|\___/ \__\__,_|_| \___/| .__/ v0.4 |_| Usage: - dotdrop.py install [-fndc ] [--profile=] - dotdrop.py compare [-c ] [--profile=] [--files=] + dotdrop.py install [-fndvc ] [--profile=] + dotdrop.py compare [-vc ] [--profile=] [--files=] dotdrop.py import [-ldc ] [--profile=] ... + dotdrop.py listfiles [-c ] [--profile=] dotdrop.py list [-c ] dotdrop.py --help dotdrop.py --version @@ -159,6 +161,7 @@ Options: -n --nodiff Do not diff when installing. -l --link Import and link. -f --force Do not warn if exists. + -v --verbose Be verbose. -d --dry Dry run. --version Show version. -h --help Show this screen. @@ -237,6 +240,24 @@ Dotdrop allows to choose which profile to use with the *--profile* switch if you used something else than the default (the hostname). +## List configured dotfiles + +The following command lists the different dotfiles +configured for a specific profile: + +``` +$ ./dotdrop.sh listfiles --profile= +``` + +For example: +``` +Dotfile(s) for profile "some-profile": + +f_vimrc (file: "vimrc", link: False) + -> ~/.vimrc +f_dunstrc (file: "config/dunst/dunstrc", link: False) + -> ~/.config/dunst/dunstrc +``` ## Update dotbot diff --git a/dotdrop/dotdrop.py b/dotdrop/dotdrop.py index f289130..c6586e4 100755 --- a/dotdrop/dotdrop.py +++ b/dotdrop/dotdrop.py @@ -177,7 +177,7 @@ def list_files(opts, conf): if not opts['profile'] in conf.get_profiles(): LOG.warn('unknown profile \"%s\"' % (opts['profile'])) return - LOG.log('Dotfile(s) for profile \"%s\":' % (opts['profile'])) + LOG.log('Dotfile(s) for profile \"%s\":\n' % (opts['profile'])) for dotfile in conf.get_dotfiles(opts['profile']): LOG.log('%s (file: \"%s\", link: %s)' % (dotfile.key, dotfile.src, str(dotfile.link)))