Backslash before newline in quoted string strips backslash #52

Closed
kballard opened this Issue Jun 7, 2012 · 1 comment

Comments

Projects
None yet
2 participants
@kballard
Contributor

kballard commented Jun 7, 2012

If a backslash occurs in a single- or double-quoted string immediately preceding a newline character, that backslash is stripped from the resulting string. This is unexpected given the rules for quoted strings. Escaping the backslash itself is a sufficient workaround to cause it to appear.

> echo 'foo\
  bar'
foo
bar

Should be:

> echo 'foo\
  bar'
foo\
bar
@ridiculousfish

This comment has been minimized.

Show comment
Hide comment
@ridiculousfish

ridiculousfish Nov 22, 2012

Member

This commit introduces the following behavior:

> echo foo\
  bar
foobar

> echo "foo\
  bar"
foobar

> echo 'foo\
  bar'
foo\
bar

To git@github.com:fish-shell/fish-shell.git
e73be48..90495f3 master -> master

Member

ridiculousfish commented Nov 22, 2012

This commit introduces the following behavior:

> echo foo\
  bar
foobar

> echo "foo\
  bar"
foobar

> echo 'foo\
  bar'
foo\
bar

To git@github.com:fish-shell/fish-shell.git
e73be48..90495f3 master -> master

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment