v0.1.0 — first release
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 intostatus-left,status-right,window-status-format,window-status-current-format, orpane-border-formatand 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 segmenttruncate_to_last— basename onlynone—$HOMEcollapse only
- Configurable — segment threshold, segment length, marker file list, all via standard
@shorten_path_*tmux options. - Reproducible demo —
demo/setup.sh+demo/demo.tapelets 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.