Skip to content

[bug] import --as unclear behavior #368

Description

@tomasz13nocon

Dotdrop version: v1.11

Describe the bug

It's not clear from the documentation how --as is supposed to interpret its argument.
dotdrop import -d ~/.config/nvim --as test
results in:
[DRY] would copy /home/user/.config/nvim to /home/user/my_dotfiles/my_dotpath/my_dotfiles/test
and using the example from the documentation:
dotdrop import -d ~/.config/nvim --as ~/test
[DRY] would copy /home/user/.config/nvim to /home/user/my_dotfiles/my_dotpath/test

The tilde seems to mean the dotpath instead of home directory, which is confusing.
And using --as without the tilde just acts weird, creating another dotfiles directory inside dotpath.

I had a look at the import-as.sh bash test, and it only tests usage with the tilde.

Steps to Reproduce

  1. mkdir ~/my_dotfiles
  2. set dotpath to my_dotpath
  3. run the commands above

Expected behavior

It would be good to mention in the documentation that --as is supposed to be used with tilde (as without it, the behavior is unexpected), and that the tilde means dotpath, not home.

Alternatively to make it more intuitive, don't use the tilde and interpret the argument as a path relative to the dotpath, so that --as some/path would result my_dotfiles/my_dotpath/some/path

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions