From 6a5784433b6b477eaff2e32bbed1b7519b40814c Mon Sep 17 00:00:00 2001 From: Bruno Sutic Date: Tue, 7 Jul 2015 00:22:47 +0200 Subject: [PATCH] `TMUX_PLUGIN_MANAGER_PATH` always has trailng slash If the trailing slash character is not there it causes issues when installing plugins. Closes #38 --- CHANGELOG.md | 1 + scripts/shared_functions.sh | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 043d1c2..6f16e0b 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -7,6 +7,7 @@ - add new `set @plugin 'repo'` plugin defintion syntax (@chilicuil) - revert back to using `-g` flag in new plugin definition syntax - permit leading whitespace with new plugin definition syntax (thanks @chilicuil) +- make sure `TMUX_PLUGIN_MANAGER_PATH` always has trailng slash ### v1.2.2, 2015-02-08 - set GIT_TERMINAL_PROMPT=0 when doing `git clone`, `pull` or `submodule update` diff --git a/scripts/shared_functions.sh b/scripts/shared_functions.sh index c8768b5..05ee2de 100644 --- a/scripts/shared_functions.sh +++ b/scripts/shared_functions.sh @@ -5,7 +5,7 @@ SHARED_TPM_PATH="" # sets a "global variable" for the current file shared_set_tpm_path_constant() { - local string_path="$(tmux show-environment -g TMUX_PLUGIN_MANAGER_PATH | cut -f2 -d=)" + local string_path="$(tmux show-environment -g TMUX_PLUGIN_MANAGER_PATH | cut -f2 -d=)/" # NOTE: manually expanding tilde or `$HOME` variable. Avoids using `eval` as # described here http://stackoverflow.com/a/5748307/777337 SHARED_TPM_PATH="$(echo "$string_path" | sed "s,^\$HOME,$HOME," | sed "s,^~,$HOME,")"