1
0
Fork 0
mirror of synced 2024-12-26 08:13:20 -05:00

TMUX_PLUGIN_MANAGER_PATH always has trailng slash

If the trailing slash character is not there it causes issues when
installing plugins.

Closes #38
This commit is contained in:
Bruno Sutic 2015-07-07 00:22:47 +02:00
parent 57e36cde13
commit 6a5784433b
No known key found for this signature in database
GPG key ID: 66D96E4F2F7EF26C
2 changed files with 2 additions and 1 deletions

View file

@ -7,6 +7,7 @@
- add new `set @plugin 'repo'` plugin defintion syntax (@chilicuil) - add new `set @plugin 'repo'` plugin defintion syntax (@chilicuil)
- revert back to using `-g` flag in new plugin definition syntax - revert back to using `-g` flag in new plugin definition syntax
- permit leading whitespace with new plugin definition syntax (thanks @chilicuil) - 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 ### v1.2.2, 2015-02-08
- set GIT_TERMINAL_PROMPT=0 when doing `git clone`, `pull` or `submodule update` - set GIT_TERMINAL_PROMPT=0 when doing `git clone`, `pull` or `submodule update`

View file

@ -5,7 +5,7 @@ SHARED_TPM_PATH=""
# sets a "global variable" for the current file # sets a "global variable" for the current file
shared_set_tpm_path_constant() { 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 # NOTE: manually expanding tilde or `$HOME` variable. Avoids using `eval` as
# described here http://stackoverflow.com/a/5748307/777337 # described here http://stackoverflow.com/a/5748307/777337
SHARED_TPM_PATH="$(echo "$string_path" | sed "s,^\$HOME,$HOME," | sed "s,^~,$HOME,")" SHARED_TPM_PATH="$(echo "$string_path" | sed "s,^\$HOME,$HOME," | sed "s,^~,$HOME,")"