mirror of
https://github.com/fish-shell/fish-shell.git
synced 2026-05-23 21:31:14 -03:00
fish_indent: Truncate file to the size of the text
This can happen in case the formatted script is shorter, e.g. because we ditched superfluous quotes. Fixes #10724
This commit is contained in:
@@ -525,3 +525,9 @@ end
|
||||
# CHECK: {{^}}"
|
||||
# CHECK: {{^}} end
|
||||
# CHECK: {{^}})
|
||||
|
||||
set -l tmpdir (mktemp -d)
|
||||
echo 'echo "foo" "bar"' > $tmpdir/indent_test.fish
|
||||
$fish_indent --write $tmpdir/indent_test.fish
|
||||
cat $tmpdir/indent_test.fish
|
||||
# CHECK: echo foo bar
|
||||
|
||||
Reference in New Issue
Block a user