Skip to content

Fix clean function #311

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
# Changelog

### 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
- upgrade to new version of `tmux-test`
Expand Down
2 changes: 1 addition & 1 deletion scripts/clean_plugins.sh
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ clean_plugins() {
local plugins plugin plugin_directory
plugins="$(tpm_plugins_list_helper)"

for plugin_directory in "$(tpm_path)"/*; do
for plugin_directory in "$(tpm_path)"*; do
[ -d "${plugin_directory}" ] || continue
plugin="$(plugin_name_helper "${plugin_directory}")"
case "${plugins}" in
Expand Down
3 changes: 1 addition & 2 deletions scripts/helpers/plugin_functions.sh
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ _manual_expansion() {
}

_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"
}

Expand All @@ -26,7 +26,6 @@ _get_user_tmux_conf() {
# Search for the correct configuration file by priority.
if [ -f "$xdg_location" ]; then
echo "$xdg_location"

else
echo "$default_location"
fi
Expand Down