Automatic set enviroment
This commit is contained in:
parent
51ff07a729
commit
1ff3120819
2 changed files with 2 additions and 16 deletions
|
@ -10,4 +10,3 @@ default_clean_key="M-u"
|
|||
SUPPORTED_TMUX_VERSION="1.9"
|
||||
|
||||
DEFAULT_TPM_ENV_VAR_NAME="TMUX_PLUGIN_MANAGER_PATH"
|
||||
DEFAULT_TPM_PATH="$HOME/.tmux/plugins/"
|
||||
|
|
17
tpm
17
tpm
|
@ -17,22 +17,9 @@ get_tmux_option() {
|
|||
fi
|
||||
}
|
||||
|
||||
tpm_path_set() {
|
||||
tmux show-environment -g "$DEFAULT_TPM_ENV_VAR_NAME" >/dev/null 2>&1
|
||||
}
|
||||
|
||||
set_default_tpm_path() {
|
||||
tmux set-environment -g "$DEFAULT_TPM_ENV_VAR_NAME" "$DEFAULT_TPM_PATH"
|
||||
}
|
||||
|
||||
# Ensures TMUX_PLUGIN_MANAGER_PATH global env variable is set.
|
||||
#
|
||||
# Put this in `.tmux.conf` to override the default:
|
||||
# `set-environment -g TMUX_PLUGIN_MANAGER_PATH "/some/other/path/"`
|
||||
# Set TMUX_PLUGIN_MANAGER_PATH global env variable.
|
||||
set_tpm_path() {
|
||||
if ! tpm_path_set; then
|
||||
set_default_tpm_path
|
||||
fi
|
||||
tmux set-environment -g "$DEFAULT_TPM_ENV_VAR_NAME" "$CURRENT_DIR/../"
|
||||
}
|
||||
|
||||
# 1. Fetches plugin names from `@plugin` variables
|
||||
|
|
Loading…
Reference in a new issue