mirror of
https://github.com/tmux-plugins/tpm.git
synced 2024-12-04 18:58:49 +00:00
Variable quoting war
This commit is contained in:
parent
19da205b0b
commit
9794997b6b
@ -1,7 +1,7 @@
|
||||
get_tmux_option() {
|
||||
local option="$1"
|
||||
local default_value="$2"
|
||||
local option_value=$(tmux show-option -gqv "$option")
|
||||
local option_value="$(tmux show-option -gqv "$option")"
|
||||
if [ -z "$option_value" ]; then
|
||||
echo "$default_value"
|
||||
else
|
||||
|
@ -62,7 +62,7 @@ install_plugin() {
|
||||
}
|
||||
|
||||
install_plugins() {
|
||||
local plugins=$(shared_get_tpm_plugins_list)
|
||||
local plugins="$(shared_get_tpm_plugins_list)"
|
||||
for plugin in $plugins; do
|
||||
install_plugin "$plugin"
|
||||
done
|
||||
|
@ -39,8 +39,8 @@ shared_plugin_name() {
|
||||
|
||||
shared_plugin_path() {
|
||||
local plugin=$1
|
||||
local plugin_name=$(shared_plugin_name "$plugin")
|
||||
echo "$SHARED_TPM_PATH$plugin_name/"
|
||||
local plugin_name="$(shared_plugin_name "$plugin")"
|
||||
echo "${SHARED_TPM_PATH}${plugin_name}/"
|
||||
}
|
||||
|
||||
# TMUX messaging is weird. You only get a nice clean pane if you do it with
|
||||
@ -82,7 +82,7 @@ display_message() {
|
||||
fi
|
||||
|
||||
# saves user-set 'display-time' option
|
||||
local saved_display_time=$(get_tmux_option "display-time" "750")
|
||||
local saved_display_time="$(get_tmux_option "display-time" "750")"
|
||||
|
||||
# sets message display time to 5 seconds
|
||||
tmux set-option -gq display-time "$display_duration"
|
||||
|
@ -27,12 +27,12 @@ silently_source_all_tmux_files() {
|
||||
|
||||
source_plugin() {
|
||||
local plugin=$1
|
||||
local plugin_path=$(shared_plugin_path "$plugin")
|
||||
local plugin_path="$(shared_plugin_path "$plugin")"
|
||||
silently_source_all_tmux_files "$plugin_path"
|
||||
}
|
||||
|
||||
source_plugins() {
|
||||
local plugins=$(shared_get_tpm_plugins_list)
|
||||
local plugins="$(shared_get_tpm_plugins_list)"
|
||||
for plugin in $plugins; do
|
||||
source_plugin "$plugin"
|
||||
done
|
||||
|
Loading…
Reference in New Issue
Block a user