tmux-plugins / tpm

Tmux Plugin Manager
MIT License
11.68k stars 415 forks source link

TPM should account for the repository's author to prevent naming conflicts #273

Open aminnairi opened 6 months ago

aminnairi commented 6 months ago

When contributing to a plugin, it is great to be able to fork a project to test things out on our own installation.

However, since the plugin only uses the name of the repository, and not the author, this can lead to naming conflicts.

If I try to use https://github.com/janoamaral/tokyo-night-tmux as a fork of mine at https://github.com/aminnairi/tokyo-night-tmux, TPM will not update the folder ~/.tmux/plugins/tokyo-night-tmux.

From my perspective, there is two possible outcome.

Use the fully-qualified repository name along with the username to prevent repository conflicts.

Or

Do check that the repository's remote is matching the repository name given when the set -g @plugin "aminnairi/tokyo-night-tmux#mode-style" option is used (in this case, check that aminnairi/tokyo-night-tmux#mode-style is matching the one in ~/.tmux/plugins/tokyo-night-tmux).

The latter will likely prevent introducing a breaking change as one possible outcome for the first solution would be to use the author's name in the folder like ~/.tmux/plugins/aminnairi/tokyo-night-tmux.

tlj commented 6 months ago

This is also an issue with some plugins which work across applications and have specific repos per application. Examples: https://github.com/rose-pine/tmux https://github.com/catppuccin/tmux