mirror of
https://github.com/fish-shell/fish-shell.git
synced 2026-05-31 03:51:14 -03:00
Treat comments ending in backslashes as not continuing onto the next line
Fixes #1255
This commit is contained in:
@@ -33,3 +33,9 @@ send_line $hist_command
|
||||
expect_prompt -re {echo .history.*} {} unmatched {
|
||||
puts stderr "Couldn't find expected output $hist_command"
|
||||
}
|
||||
|
||||
# Backslashes at end of comments (#1255)
|
||||
# This backslash should NOT cause the line to continue
|
||||
send_line "echo -n #comment\\"
|
||||
expect_prompt
|
||||
|
||||
|
||||
@@ -155,6 +155,11 @@ echo before comment \
|
||||
# comment
|
||||
after comment
|
||||
|
||||
# Backslashes are part of comments and do not join lines (#1255)
|
||||
# This should execute false, not echo it
|
||||
echo -n # comment\
|
||||
false
|
||||
|
||||
function always_fails
|
||||
if true
|
||||
return 1
|
||||
|
||||
Reference in New Issue
Block a user