-
-
Notifications
You must be signed in to change notification settings - Fork 104
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[feature] Manually specify key/dodrop-location #220
Comments
That should be doable, I'll look into that and keep you updated. |
This was more complex than expected (avoid duplicates, multiple dotfiles with same destination, etc) but I think I have something in branch import-as. Could you give it a try and let me know what you think? The new feature should allow you to do: ./dotdrop.sh import ~/.config/file --as=~/.config/file_profile |
Looks good 👍 The only thing irritating me a bit (though no deal breaker): It seems as if handling of path expansion (e.g when calling |
I don't get the same behavior as you (see below), can you give me a complete example where that fails? $ touch ~/.dotdrop.test
$ ./dotdrop.sh import ~/.dotdrop.test --as ~/.dotdrop.test2
-> "/home/user/.dotdrop.test" imported
$ cat config.yaml
config:
backup: true
banner: true
create: true
dotpath: dotfiles
keepdot: false
link_dotfile_default: nolink
link_on_import: nolink
longkey: false
dotfiles:
f_dotdrop.test:
src: dotdrop.test2
dst: ~/.dotdrop.test
profiles:
hostname:
dotfiles:
- f_dotdrop.test
$ tree dotfiles
dotfiles
└── dotdrop.test2 |
Can you retry with long keys enabled, please? I guess that might cause the issue. |
nope, same behavior: $ ./dotdrop.sh import ~/.dotdrop.test --as ~/.dotdrop.test2
-> "/home/user/.dotdrop.test" imported
1 file(s) imported.
$ cat config.yaml
config:
backup: true
banner: true
create: true
dotpath: dotfiles
keepdot: false
link_dotfile_default: nolink
link_on_import: nolink
longkey: true
dotfiles:
f_dotdrop.test:
src: dotdrop.test2
dst: ~/.dotdrop.test
profiles:
hostname:
dotfiles:
- f_dotdrop.test
$ tree dotfiles
dotfiles
└── dotdrop.test2 I have also tested with You can't reproduce above issue? |
Sorry for the delay. Yes, I can reproduce the issue locally. Here's the head of my dotdrop-config: dotdrop.yamlconfig:
backup: true
banner: true
create: true
dotpath: ~/.dot/dotfiles
workdir: ~/.config/dotdrop/
keepdot: false
link_dotfile_default: nolink
link_on_import: nolink
longkey: true
minversion: 0.32.0
dotfiles:
[...] my versions:
When I issue
this is the resulting diff of the config: Git dotdrop config diffdiff --git a/dotfiles/config/dotdrop/config.yaml b/dotfiles/config/dotdrop/config.yaml
index 2bd1521..b551cb8 100644
--- a/dotfiles/config/dotdrop/config.yaml
+++ b/dotfiles/config/dotdrop/config.yaml
@@ -89,6 +89,9 @@ dotfiles:
f_zshrc.pre:
src: zshrc.pre
dst: ~/.zshrc.pre
+ f_zshrc_1:
+ src: dot/dotdrop/~/.zshrc.test
+ dst: ~/.zshrc
profiles:
pheerai:
include:
@@ -143,3 +146,6 @@ profiles:
- f_config_vdirsyncer_config
- f_config_khal_config
- f_config_khard_khard.conf
+ test:
+ dotfiles:
+ - f_zshrc_1 As you can see, this results in a |
Yeah it should and above commit should have fixed that. Thanks for pointing that out! |
Works like charm, thank you! |
This was merged into master and will be available on pypi on the next release. Thanks again for your help. |
First of: Thanks for your work on this great tool!
Now for the Feature Request:
Situation
I have a profile for my servers, and one for my desktop machines, both of which require a specific file
f
in the same location.The content for the profiles is almost non-overlapping.
What I'd like to do
My proposal would be a command for importing files somewhat like this:
E.g. introducing an argument to tell dotdrop to import a file "as if it was named differently".
This should:
~/.config/file
to$DOTDIR/config/file_profile
What I currently do
Either I generate a templated dotfile (tedious), or I copy the second file manually to some different location in my repo and modify the config by hand (say, I have
f
from profileS
imported asf
, then I'd manually create a filef_D
as well as a corresponding key and dotfile entry for profileD
).The text was updated successfully, but these errors were encountered: