mirror of
https://github.com/tmux-plugins/tpm.git
synced 2025-11-05 00:56:05 +00:00
Merge branch 'master' into add-branch-to-plugin
This commit is contained in:
@@ -20,7 +20,7 @@ _CACHED_TPM_PATH="$(_tpm_path)"
|
||||
#
|
||||
_get_user_tmux_conf() {
|
||||
# Define the different possible locations.
|
||||
xdg_location="$XDG_CONFIG_HOME/tmux/tmux.conf"
|
||||
xdg_location="${XDG_CONFIG_HOME:-$HOME/.config}/tmux/tmux.conf"
|
||||
default_location="$HOME/.tmux.conf"
|
||||
|
||||
# Search for the correct configuration file by priority.
|
||||
@@ -46,7 +46,7 @@ _tmux_conf_contents() {
|
||||
# return files sourced from tmux config files
|
||||
_sourced_files() {
|
||||
_tmux_conf_contents |
|
||||
awk '/^[ \t]*source(-file)? +/ { gsub(/'\''/,""); gsub(/'\"'/,""); print $2 }'
|
||||
sed -E -n -e "s/^[[:space:]]*source(-file)?[[:space:]]+(-q+[[:space:]]+)?['\"]?([^'\"]+)['\"]?/\3/p"
|
||||
}
|
||||
|
||||
# Want to be able to abort in certain cases
|
||||
|
||||
@@ -1,3 +1,6 @@
|
||||
HELPERS_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
|
||||
source "$HELPERS_DIR/plugin_functions.sh"
|
||||
|
||||
reload_tmux_environment() {
|
||||
tmux source-file ~/.tmux.conf >/dev/null 2>&1
|
||||
tmux source-file $(_get_user_tmux_conf) >/dev/null 2>&1
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user