Files
dotfiles/.config/fish/functions/_pure_string_width.fish
T
Geoff dd3895ccbd Dotfiles commit (try to keep under 50 characters)
Multi-line description of commit,
feel free to be detailed.

[Ticket: X]
~
~
".git/COMMIT_EDITMSG" 14L, 297C
2026-05-05 10:37:59 +02:00

10 lines
283 B
Fish

function _pure_string_width \
--description 'returns raw string length, i.e. ignore ANSI-color' \
--argument-names prompt
set --local empty ''
set --local raw_prompt (string replace --all --regex '\e\[[^m]*m' $empty -- $prompt)
string length -- $raw_prompt
end