1
0
Fork 0
mirror of synced 2024-11-18 07:25:34 -05:00
This commit is contained in:
Gregory Pakosz 2024-10-28 19:31:22 +01:00
parent 5fcc377128
commit 6fe6f44222

View file

@ -164,6 +164,8 @@ run 'cut -c3- "$TMUX_CONF" | sh -s _apply_configuration'
# # exit the script if any statement returns a non-true return value # # exit the script if any statement returns a non-true return value
# set -e # set -e
# #
# unset SHELL
#
# unset GREP_OPTIONS # unset GREP_OPTIONS
# export LC_NUMERIC=C # export LC_NUMERIC=C
# # shellcheck disable=SC3041 # # shellcheck disable=SC3041
@ -193,11 +195,11 @@ run 'cut -c3- "$TMUX_CONF" | sh -s _apply_configuration'
# fi # fi
# if [ "$TMUX_PROGRAM" = "tmux" ]; then # if [ "$TMUX_PROGRAM" = "tmux" ]; then
# tmux() { # tmux() {
# command tmux ${TMUX_SOCKET:+-S "$TMUX_SOCKET"} "$@" # command tmux ${TMUX_SOCKET:+-S} ${TMUX_SOCKET:+"$TMUX_SOCKET"} "$@"
# } # }
# else # else
# tmux() { # tmux() {
# "$TMUX_PROGRAM" ${TMUX_SOCKET:+-S "$TMUX_SOCKET"} "$@" # "$TMUX_PROGRAM" ${TMUX_SOCKET:+-S} ${TMUX_SOCKET:+"$TMUX_SOCKET"} "$@"
# } # }
# fi # fi
# #
@ -1607,8 +1609,26 @@ run 'cut -c3- "$TMUX_CONF" | sh -s _apply_configuration'
# fi # fi
# mkdir -p "$TMUX_PLUGIN_MANAGER_PATH" # mkdir -p "$TMUX_PLUGIN_MANAGER_PATH"
# #
# tpm_plugins=$(tmux show -gvq '@tpm_plugins' 2>/dev/null) # __discover_configuration_files() (
# if [ -z "$(tmux show -gv '@plugin' 2>/dev/null)" ] && [ -z "$tpm_plugins" ]; then # IFS=$(printf '\nx')
# IFS=${IFS%?}
# ___discover_configuration_files() {
# for current_file in "$@"; do
# current_file="$(cd "${current_file%/*}" 2>/dev/null && pwd)/${current_file##*/}" || continue
# [ "$discovered_configuration_files" == "${discovered_configuration_files/$current_file/}" ] || continue
# discovered_configuration_files=$(printf '%s\n%s' "$discovered_configuration_files" "$current_file")
# ___discover_configuration_files $(tmux source -nvq "$current_file" | perl -s -n -E 's/current_file/\@current_file/g; if (/^$current_file:\d+:\s*source(?:-file)?((?:\s-[qF]+)*)?\s*(["'"'"'])(.+?)\2$/) { if ($1 ne "") { print `tmux set "\@current_file" "$current_file" \\; display -pF "$3" \\; set -u "\@current_file"` } else { say $3 } }' -- -current_file="$current_file")
# done
# }
# ___discover_configuration_files "$@"
# printf '%s\n' "$discovered_configuration_files"
# )
# tpm_plugins=$(cat << EOF | tr ' ' '\n' | awk '/^\s*$/ {next;}; !seen[$0]++ { gsub(/^[ \t]+/,"",$0); gsub(/[ \t]+$/,"",$0); print $0 }'
# $tpm_plugins
# $(IFS=$(printf '\nx'); IFS=${IFS%?}; awk '/^[ \t]*set(-option)?.*[ \t]@plugin[ \t]/ { gsub(/'\''/, ""); gsub(/'\"'/, ""); print $NF }' $(__discover_configuration_files "$TMUX_CONF_LOCAL") 2>/dev/null)
# EOF
# )
# if [ -z "$tpm_plugins" ]; then
# if _is_true "$tmux_conf_uninstall_plugins_on_reload" && [ -d "$TMUX_PLUGIN_MANAGER_PATH/tpm" ]; then # if _is_true "$tmux_conf_uninstall_plugins_on_reload" && [ -d "$TMUX_PLUGIN_MANAGER_PATH/tpm" ]; then
# tmux display 'Uninstalling tpm and plugins...' # tmux display 'Uninstalling tpm and plugins...'
# tmux set-environment -gu TMUX_PLUGIN_MANAGER_PATH # tmux set-environment -gu TMUX_PLUGIN_MANAGER_PATH
@ -1617,11 +1637,6 @@ run 'cut -c3- "$TMUX_CONF" | sh -s _apply_configuration'
# fi # fi
# else # else
# if [ "$(command tmux display -p '#{pid} #{version} #{socket_path}')" = "$("$TMUX_PROGRAM" display -p '#{pid} #{version} #{socket_path}')" ]; then # if [ "$(command tmux display -p '#{pid} #{version} #{socket_path}')" = "$("$TMUX_PROGRAM" display -p '#{pid} #{version} #{socket_path}')" ]; then
# tpm_plugins=$(cat << EOF | tr ' ' '\n' | awk '/^\s*$/ {next;}; !seen[$0]++ { gsub(/^[ \t]+/,"",$0); gsub(/[ \t]+$/,"",$0); print $0 }'
# $tpm_plugins
# $(awk '/^[ \t]*set(-option)?.*[ \t]@plugin[ \t]/ { gsub(/'\''/, ""); gsub(/'\"'/, ""); print $NF }' "$TMUX_CONF_LOCAL" 2>/dev/null)
# EOF
# )
# tmux set-environment -g TMUX_PLUGIN_MANAGER_PATH "$TMUX_PLUGIN_MANAGER_PATH" # tmux set-environment -g TMUX_PLUGIN_MANAGER_PATH "$TMUX_PLUGIN_MANAGER_PATH"
# tmux set -g '@tpm_plugins' "$tpm_plugins" # tmux set -g '@tpm_plugins' "$tpm_plugins"
# #