1
0
Fork 0
mirror of synced 2024-11-17 23:15:35 -05:00

fixup! wip

This commit is contained in:
Gregory Pakosz 2024-10-29 14:13:44 +01:00
parent 6fe6f44222
commit 983f009f27

View file

@ -195,11 +195,11 @@ run 'cut -c3- "$TMUX_CONF" | sh -s _apply_configuration'
# fi
# if [ "$TMUX_PROGRAM" = "tmux" ]; then
# tmux() {
# command tmux ${TMUX_SOCKET:+-S} ${TMUX_SOCKET:+"$TMUX_SOCKET"} "$@"
# command tmux ${TMUX_SOCKET:+-S "$TMUX_SOCKET"} "$@"
# }
# else
# tmux() {
# "$TMUX_PROGRAM" ${TMUX_SOCKET:+-S} ${TMUX_SOCKET:+"$TMUX_SOCKET"} "$@"
# "$TMUX_PROGRAM" ${TMUX_SOCKET:+-S "$TMUX_SOCKET"} "$@"
# }
# fi
#
@ -906,7 +906,7 @@ run 'cut -c3- "$TMUX_CONF" | sh -s _apply_configuration'
# if _is_true "$tmux_conf_preserve_stock_bindings"; then
# probe_socket="$(dirname "$TMUX_SOCKET")/tmux-stock-bindings-$$"
# TMUX_SOCKET="$probe_socket" tmux -f /dev/null list-keys >> "$cfg"
# rm -f "%probe_socket"
# rm -f "$probe_socket"
# fi
#
# # tmux 3.0 doesn't include 02254d1e5c881be95fd2fc37b4c4209640b6b266 and the
@ -1609,23 +1609,14 @@ run 'cut -c3- "$TMUX_CONF" | sh -s _apply_configuration'
# fi
# mkdir -p "$TMUX_PLUGIN_MANAGER_PATH"
#
# __discover_configuration_files() (
# 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_plugins() {
# probe_socket="$(dirname "$TMUX_SOCKET")/tmux-discover-plugins-$$"
# TMUX_SOCKET="$probe_socket" tmux -f /dev/null new-session -dE true \; set-hook -g after-set-option 'set -gFa @all_plugins "#{?#{m:*#{@plugin},#{@all_plugins}},,#{@plugin} }"' \; source "$1" \; show -gqv @all_plugins \; kill-server 2>/dev/null
# rm -f "$probe_socket"
# }
# ___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)
# $(__discover_plugins "$TMUX_CONF_LOCAL")
# EOF
# )
# if [ -z "$tpm_plugins" ]; then