mirror of
https://github.com/tmux-plugins/tpm.git
synced 2024-12-04 18:58:49 +00:00
Manually expand tilde and $HOME in TMUX_SHARED_MANAGER_PATH
Tilde char and `$HOME` in `TMUX_SHARED_MANAGER_PATH` couldn't be used because they are just plain strings. Fixing the problem by manually expanding them.
This commit is contained in:
parent
804a90707c
commit
27d7cbd6b3
@ -4,6 +4,8 @@
|
||||
- if the plugin is not downloaded do not source it
|
||||
- remove `PLUGINS.md`, an obsolete list of plugins
|
||||
- update readme with instructions about uninstalling plugins
|
||||
- tilde char and `$HOME` in `TMUX_SHARED_MANAGER_PATH` couldn't be used because
|
||||
they are just plain strings. Fixing the problem by manually expanding them.
|
||||
|
||||
### v1.0.0, 2014-08-05
|
||||
- update readme because of github organization change to
|
||||
|
@ -5,7 +5,10 @@ SHARED_TPM_PATH=""
|
||||
|
||||
# sets a "global variable" for the current file
|
||||
shared_set_tpm_path_constant() {
|
||||
SHARED_TPM_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,")"
|
||||
}
|
||||
|
||||
shared_get_tpm_plugins_list() {
|
||||
|
Loading…
Reference in New Issue
Block a user