mirror of
https://github.com/tmux-plugins/tpm.git
synced 2024-12-04 18:58:49 +00:00
Refactor 'tpm' script
This commit is contained in:
parent
169e1b2e88
commit
79d90f90f7
@ -1,10 +0,0 @@
|
||||
get_tmux_option() {
|
||||
local option="$1"
|
||||
local default_value="$2"
|
||||
local option_value="$(tmux show-option -gqv "$option")"
|
||||
if [ -z "$option_value" ]; then
|
||||
echo "$default_value"
|
||||
else
|
||||
echo "$option_value"
|
||||
fi
|
||||
}
|
12
tpm
12
tpm
@ -5,7 +5,17 @@ BINDINGS_DIR="$CURRENT_DIR/bindings"
|
||||
SCRIPTS_DIR="$CURRENT_DIR/scripts"
|
||||
|
||||
source "$SCRIPTS_DIR/variables.sh"
|
||||
source "$SCRIPTS_DIR/helpers.sh"
|
||||
|
||||
get_tmux_option() {
|
||||
local option="$1"
|
||||
local default_value="$2"
|
||||
local option_value="$(tmux show-option -gqv "$option")"
|
||||
if [ -z "$option_value" ]; then
|
||||
echo "$default_value"
|
||||
else
|
||||
echo "$option_value"
|
||||
fi
|
||||
}
|
||||
|
||||
tpm_path_set() {
|
||||
tmux show-environment -g "$DEFAULT_TPM_ENV_VAR_NAME" >/dev/null 2>&1
|
||||
|
Loading…
Reference in New Issue
Block a user