1
0
Fork 0
mirror of synced 2025-01-14 17:06:15 -05:00

Fix clean function

This commit is contained in:
slange-dev 2025-01-10 02:35:05 +01:00
parent 99469c4a9b
commit 37bf61ad79
No known key found for this signature in database
GPG key ID: 1D45A63B186F4EFE
3 changed files with 3 additions and 3 deletions

View file

@ -1,6 +1,7 @@
# Changelog # Changelog
### master ### master
- bug: fix the `clean_plugins` function and delete too many slashes, `TMUX_PLUGIN_MANAGER_PATH` default is set to `/` at the path end.
### v3.1.0, 2023-01-03 ### v3.1.0, 2023-01-03
- upgrade to new version of `tmux-test` - upgrade to new version of `tmux-test`

View file

@ -16,7 +16,7 @@ clean_plugins() {
local plugins plugin plugin_directory local plugins plugin plugin_directory
plugins="$(tpm_plugins_list_helper)" plugins="$(tpm_plugins_list_helper)"
for plugin_directory in "$(tpm_path)"/*; do for plugin_directory in "$(tpm_path)"*; do
[ -d "${plugin_directory}" ] || continue [ -d "${plugin_directory}" ] || continue
plugin="$(plugin_name_helper "${plugin_directory}")" plugin="$(plugin_name_helper "${plugin_directory}")"
case "${plugins}" in case "${plugins}" in

View file

@ -9,7 +9,7 @@ _manual_expansion() {
} }
_tpm_path() { _tpm_path() {
local string_path="$(tmux start-server\; show-environment -g TMUX_PLUGIN_MANAGER_PATH | cut -f2 -d=)/" local string_path="$(tmux start-server\; show-environment -g TMUX_PLUGIN_MANAGER_PATH | cut -f2 -d=)"
_manual_expansion "$string_path" _manual_expansion "$string_path"
} }
@ -26,7 +26,6 @@ _get_user_tmux_conf() {
# Search for the correct configuration file by priority. # Search for the correct configuration file by priority.
if [ -f "$xdg_location" ]; then if [ -f "$xdg_location" ]; then
echo "$xdg_location" echo "$xdg_location"
else else
echo "$default_location" echo "$default_location"
fi fi