Variable quoting war

This commit is contained in:
Bruno Sutic 2015-08-03 00:42:03 +02:00
parent 19da205b0b
commit 9794997b6b
No known key found for this signature in database
GPG Key ID: 66D96E4F2F7EF26C
4 changed files with 7 additions and 7 deletions

View File

@ -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

View File

@ -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

View File

@ -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"

View File

@ -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