1
0
Fork 0
mirror of synced 2024-12-13 19:05:45 -05:00

Re-order private functions to make the following diff easier to read

This commit is contained in:
Raul E Rangel 2019-02-20 12:51:26 -07:00
parent 2ab1d9101b
commit 33c5d9a3af

View file

@ -1,20 +1,6 @@
# using @tpm_plugins is now deprecated in favor of using @plugin syntax
tpm_plugins_variable_name="@tpm_plugins"
# manually expanding tilde char or `$HOME` variable.
_manual_expansion() {
local path="$1"
local expanded_tilde="${path/#\~/$HOME}"
echo "${expanded_tilde/#\$HOME/$HOME}"
}
_tpm_path() {
local string_path="$(tmux start-server\; show-environment -g TMUX_PLUGIN_MANAGER_PATH | cut -f2 -d=)/"
_manual_expansion "$string_path"
}
_CACHED_TPM_PATH="$(_tpm_path)"
# Get the absolute path to the users configuration file of TMux.
# This includes a prioritized search on different locations.
#
@ -49,6 +35,20 @@ _sourced_files() {
awk '/^[ \t]*source(-file)? +/ { gsub(/'\''/,""); gsub(/'\"'/,""); print $2 }'
}
# manually expanding tilde char or `$HOME` variable.
_manual_expansion() {
local path="$1"
local expanded_tilde="${path/#\~/$HOME}"
echo "${expanded_tilde/#\$HOME/$HOME}"
}
_tpm_path() {
local string_path="$(tmux start-server\; show-environment -g TMUX_PLUGIN_MANAGER_PATH | cut -f2 -d=)/"
_manual_expansion "$string_path"
}
_CACHED_TPM_PATH="$(_tpm_path)"
# Want to be able to abort in certain cases
trap "exit 1" TERM
export TOP_PID=$$