migrate to dotter
This commit is contained in:
parent
c5618f2f2c
commit
23b6c0a596
265 changed files with 62 additions and 3125 deletions
9
configs/fish/functions/_pure_string_width.fish
Normal file
9
configs/fish/functions/_pure_string_width.fish
Normal file
|
|
@ -0,0 +1,9 @@
|
|||
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
|
||||
Loading…
Add table
Add a link
Reference in a new issue