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

Removing tag affects host-specific dotfiles #268

Open ratijas opened 4 years ago

ratijas commented 4 years ago

Description

Attempt to remove tag-specific dotfiles via rcdn -v -t some-tag removes host-specific files.

I have HOSTNAME set in my .rcrc config, but it does not seem to matter.

Expected behavior

Leave host-specific dotfiles in place, when only asked to act upon specific tags.

Actual behavior

Host-specific dotfiles get erased by rcdn -t

Example

$ rcdn -v -t zsh
removed '/home/ratijas/.local/share/applications/T1.desktop'
removed '/home/ratijas/.local/share/applications/T2.desktop'
removed '/home/ratijas/.rcrc'
...
$ rcup -v
'/home/ratijas/.dotfiles/host-getaway/local/share/applications/T1.desktop' -> '/home/ratijas/.local/share/applications/T1.desktop'
'/home/ratijas/.dotfiles/host-getaway/local/share/applications/T2.desktop' -> '/home/ratijas/.local/share/applications/T2.desktop'
'/home/ratijas/.dotfiles/host-getaway/rcrc' -> '/home/ratijas/.rcrc'
...

As you can see, T1 and T2.desktop belong to host-getaway host-specific directory, but they got removed by rcdn -t command.

Additional information

OS: Arch Linux
rcm: 1.3.4-1
shell: zsh
dotfiles: https://github.com/ratijas/dotfiles
ratijas commented 4 years ago

Also, man page for rcdn(1) is not very clear about this.

-t TAG — remove dotfiles according to TAG

It is not clear from the definition of the flag whether it will remove only according to TAG, or in addition to it.