1
0
Fork 0
mirror of synced 2025-04-18 20:49:42 -04:00

improved #{pretty_pane_current_path}

This commit is contained in:
Gregory Pakosz 2025-02-09 15:02:44 +01:00
parent 3d15beaa13
commit babf1c1fc6

View file

@ -250,7 +250,10 @@ run 'cut -c3- "$TMUX_CONF" | sh -s _apply_configuration'
# if [ "$max_length" = "auto" ]; then
# max_length=$(($(tmux -q display -p '#{client_width}') / 4))
# fi
# { cd "$*" && pwd || printf '%s' "$*"; } | perl -s -p -E 's|^$HOME|~|; /^.{0,$max_length}$/ || s|(~?\/[^/]+)(/[^/]+)(?:/.+)(/[^/]+)$|$1$2/...$3|g' -- -HOME="$HOME" -max_length="$max_length"
# { cd "$*" && pwd || printf '%s' "$*"; } | perl -s -p -E '
# s|^$HOME|~|;
# /^.{0,$max_length}$/ || s|(~/[^/]+)(/[^/]+)(?:/.+)?(/[^/]+)$|$1$2/...$3|g;
# /^.{0,$max_length}$/ || s|(~/[^/]+)(/[^/]+)(?:/.+)(/[^/]+)$|$1/...$3|g;' -- -HOME="$HOME" -max_length="$max_length"
# }
#
# if command -v pkill > /dev/null 2>&1; then