mirror of
https://github.com/fish-shell/fish-shell.git
synced 2026-06-05 00:01:15 -03:00
string shorten: Make max of 0 mean no shortening
This makes it easier to just slot in `string shorten` wherever, without having to do a weird "if test $max -gt 0" check.
This commit is contained in:
@@ -950,3 +950,8 @@ for i in (seq 1 (string length -V -- $str))
|
||||
test $len = $i
|
||||
or echo Oopsie ellipsizing to $i failed
|
||||
end
|
||||
|
||||
string shorten -m0 foo bar asodjsaoidj
|
||||
# CHECK: foo
|
||||
# CHECK: bar
|
||||
# CHECK: asodjsaoidj
|
||||
|
||||
Reference in New Issue
Block a user