mirror of
https://github.com/fish-shell/fish-shell
synced 2024-11-14 17:07:44 +00:00
967c1d51ee
Brace expansion with single words in it is quite useless - `HEAD@{0}` expanding to `HEAD@0` breaks git. So we complicate the rule slightly - if there is no variable expansion or "," inside of braces, they are just treated as literal braces. Note that this is technically backwards-incompatible, because echo foo{0} will now print `foo{0}` instead of `foo0`. However that's a technicality because the braces were literally useless in that case. Our tests needed to be adjusted, but that's because they are meant to exercise this in weird ways. I don't believe this will break any code in practice. Fixes #5869.
57 lines
1.3 KiB
Text
57 lines
1.3 KiB
Text
|
|
####################
|
|
# Comments in odd places don't cause problems
|
|
|
|
####################
|
|
# Brace expansion
|
|
|
|
####################
|
|
# Escaped newlines
|
|
|
|
####################
|
|
# Simple function tests
|
|
|
|
####################
|
|
# Testing builtin status
|
|
|
|
####################
|
|
# Verify that we can turn stderr into stdout and then pipe it
|
|
|
|
####################
|
|
# Test that trailing ^ doesn't trigger redirection, see #1873
|
|
|
|
####################
|
|
# Verify that we can pipe something other than stdout
|
|
|
|
####################
|
|
# echo tests
|
|
|
|
####################
|
|
# Verify that pipes don't conflict with fd redirections
|
|
|
|
####################
|
|
# Make sure while loops don't run forever with no-exec (#1543)
|
|
|
|
####################
|
|
# For loops with read-only vars is an error (#4342)
|
|
fish: You cannot use read-only variable 'status' in a for loop
|
|
for status in a b c
|
|
^
|
|
|
|
####################
|
|
# That goes for non-electric ones as well (#5548)
|
|
fish: You cannot use read-only variable 'hostname' in a for loop
|
|
for hostname in a b c
|
|
^
|
|
|
|
####################
|
|
# For loop control vars available outside the for block
|
|
|
|
####################
|
|
# Comments allowed in between lines (#1987)
|
|
|
|
####################
|
|
# Backslashes are part of comments and do not join lines (#1255)
|
|
|
|
####################
|
|
# Verify $argv set correctly in sourced scripts (#139)
|