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