Skip to content

v0.1.0 — first release

Choose a tag to compare

@Amdhj22 Amdhj22 released this 13 May 09:26

First public release of tmux-shorten-path — a TPM plugin that exposes a #{shorten_path} placeholder for folder-aware path shortening in tmux status bars.

Highlights

  • #{shorten_path} placeholder — drop it into status-left, status-right, window-status-format, window-status-current-format, or pane-border-format and the plugin rewrites it to the current pane's shortened path on each status refresh.
  • Four shortening strategies (@shorten_path_strategy):
    • truncate_to_unique (default) — folder-marker anchor + shortest unique prefix among siblings (p10k-style)
    • truncate_from_right — first N chars per non-last segment
    • truncate_to_last — basename only
    • none$HOME collapse only
  • Configurable — segment threshold, segment length, marker file list, all via standard @shorten_path_* tmux options.
  • Reproducible demodemo/setup.sh + demo/demo.tape lets anyone regenerate the README gif with vhs.

Install

set -g @plugin 'Amdhj22/tmux-shorten-path'

Then prefix + I to install.

Compatibility

  • tmux 3.0+
  • macOS, Linux
  • zsh (for the script — does not require zsh as your shell)

See the README for full options table, algorithm notes, and examples.