diff options
author | Kurtis Rader <krader@skepticism.us> | 2016-04-05 15:43:24 -0700 |
---|---|---|
committer | Kurtis Rader <krader@skepticism.us> | 2016-04-05 19:29:23 -0700 |
commit | 4ff8e6e7818747d805ac44be0a36aedef4deaa5c (patch) | |
tree | b3ce6c2af09f052278201d6b0209b69a16ac8787 /tests | |
parent | 8e8b5a648197ca83af50064bc9492ca855e9d705 (diff) |
change how redirections are formatted
Modify `fish_indent` to emit redirections without a space before the target of
the redirection; e.g., "2>&1" rather than "2>& 1" as the former is clearer to
humans.
Fixes #2899
Diffstat (limited to 'tests')
-rw-r--r-- | tests/indent.in | 6 | ||||
-rw-r--r-- | tests/indent.out | 4 |
2 files changed, 10 insertions, 0 deletions
diff --git a/tests/indent.in b/tests/indent.in index 83ef915b..a1143c67 100644 --- a/tests/indent.in +++ b/tests/indent.in @@ -83,3 +83,9 @@ echo -n ' if begin ; false; end; echo hi ; end while begin ; false; end; echo hi ; end ' | ../test/root/bin/fish_indent + +echo \nTest redir formatting +# issue 2899 +echo -n ' +echo < stdin >>appended yes 2>&1 no > stdout maybe 2>& 4 | cat 2>| cat +' | ../test/root/bin/fish_indent diff --git a/tests/indent.out b/tests/indent.out index b2eaf08a..6b38a72f 100644 --- a/tests/indent.out +++ b/tests/indent.out @@ -91,3 +91,7 @@ while begin end echo hi end + +Test redir formatting + +echo <stdin >>appended yes 2>&1 no >stdout maybe 2>&4 | cat 2>| cat |