Re-order private functions to make the following diff easier to read
This commit is contained in:
parent
2ab1d9101b
commit
33c5d9a3af
1 changed files with 14 additions and 14 deletions
|
@ -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=$$
|
||||
|
|
Loading…
Reference in a new issue