mirror of
https://github.com/deadc0de6/dotdrop.git
synced 2026-02-05 14:58:48 +00:00
refactor link_import_default to link_on_import (#110)
This commit is contained in:
@@ -31,7 +31,7 @@ class Cfg:
|
||||
key_keepdot = 'keepdot'
|
||||
key_ignoreempty = 'ignoreempty'
|
||||
key_showdiff = 'showdiff'
|
||||
key_imp_link = 'link_import_default'
|
||||
key_imp_link = 'link_on_import'
|
||||
key_dotfile_link = 'link_dotfile_default'
|
||||
key_workdir = 'workdir'
|
||||
key_include_vars = 'import_variables'
|
||||
|
||||
@@ -65,7 +65,7 @@ Options:
|
||||
-C --file=<path> Path of dotfile to compare.
|
||||
-i --ignore=<pattern> Pattern to ignore.
|
||||
-o --dopts=<opts> Diff options [default: ].
|
||||
-l --link=<link> "link_import_default" (nolink|link|link_children).
|
||||
-l --link=<link> "link_on_import" (nolink|link|link_children).
|
||||
-n --nodiff Do not diff when installing.
|
||||
-t --temp Install to a temporary directory for review.
|
||||
-T --template Only template dotfiles.
|
||||
@@ -185,7 +185,7 @@ class Options(AttrMonitor):
|
||||
self.safe = not self.args['--force']
|
||||
|
||||
# import link default value
|
||||
self.import_link = self.link_import_default
|
||||
self.import_link = self.link_on_import
|
||||
link = self.args['--link']
|
||||
if link:
|
||||
if link not in OPT_LINK.keys():
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
# author: deadc0de6 (https://github.com/deadc0de6)
|
||||
# Copyright (c) 2019, deadc0de6
|
||||
#
|
||||
# test the use of the keyword "link_import_default"
|
||||
# test the use of the keyword "link_on_import"
|
||||
# returns 1 in case of error
|
||||
#
|
||||
|
||||
@@ -63,7 +63,7 @@ config:
|
||||
backup: true
|
||||
create: true
|
||||
dotpath: dotfiles
|
||||
link_import_default: nolink
|
||||
link_on_import: nolink
|
||||
dotfiles:
|
||||
profiles:
|
||||
_EOF
|
||||
@@ -85,7 +85,7 @@ config:
|
||||
backup: true
|
||||
create: true
|
||||
dotpath: dotfiles
|
||||
link_import_default: link
|
||||
link_on_import: link
|
||||
dotfiles:
|
||||
profiles:
|
||||
_EOF
|
||||
|
||||
@@ -74,7 +74,7 @@ config:
|
||||
banner: true
|
||||
longkey: false
|
||||
keepdot: false
|
||||
link_import_default: {}
|
||||
link_on_import: {}
|
||||
link_dotfile_default: nolink
|
||||
dotfiles:
|
||||
profiles:
|
||||
@@ -104,7 +104,7 @@ config:
|
||||
banner: true
|
||||
longkey: false
|
||||
keepdot: false
|
||||
link_import_default: {}
|
||||
link_on_import: {}
|
||||
link_dotfile_default: nolink
|
||||
dotfiles:
|
||||
profiles:
|
||||
|
||||
Reference in New Issue
Block a user