thoughtbot / rcm

rc file (dotfile) management
https://thoughtbot.github.io/rcm/rcm.7.html
BSD 3-Clause "New" or "Revised" License
3.13k stars 136 forks source link

mkrc Suggested improvements (mkrc 改进建议) #277

Open eonun opened 3 years ago

eonun commented 3 years ago

When I added a dotfiles with mkrc, after some time I need to create more configuration files in the same directory, and now I need to add the new files to dotfiles for management, I used mkrc to add the whole directory again, and then the already added The configuration file is added again and the final file is not accessible. It is recommended to add a check to filter previously added configuration files. (当我使用 mkrc 添加了一个 dotfiles 后,过了一段时间又需要在同一个目录下新建了多个配置文件,现在需要将后面新建的文件加入到 dotfiles进行管理,我使用了 mkrc 又将整个目录进行了一次添加,这时就会将已经添加过的配置文件再次添加,访问不到最终文件。建议添加一个检查,用于过滤以前添加过的配置文件。)

Process (过程):

mkrc -t test .config/test

ls -l .config/test
... config -> ~/.dotfiles/tag-test/config/test/config

ls -l .dotfiles/tag-test/config/test/
... config

touch .cofig/shell
mkrc -t test .config/test
ls -l .config/test
... config -> ~/.dotfiles/tag-test/config/test/config
... test/

ls -l .config/test/test/
... config -> ~/.dotfiles/tag-test/config/test/test/config
... shell -> ~/.dotfiles/tag-test/config/test/test/shell

ls -l .dotfiles/tag-test/config/test/
... config
... test/

ls -l .dotfiles/tag-test/config/test/test
... config -> /home/eonun/.dotfiles/tag-test/config/test/config
... shell

config will not find the shellconfig找不到shell

mat-m commented 3 years ago

As far as I can tell, this should be fixed by #252.