edc / bass

Make Bash utilities usable in Fish shell
MIT License
2.2k stars 70 forks source link

Bugfix for multiline variables #50

Closed daveyarwood closed 7 years ago

daveyarwood commented 7 years ago

I discovered that bass produces a bad script when running a bash script that exports (creates or updates) an environment variable whose value is multiple lines.

For example, this bash script:

export MULTILINE_VAR=$(echo -e "foo\nbar\nbaz")

produces this fish script:

# adding MULTILINE_VAR=foo
bar
baz

Running the script then results in bar: command not found and baz: command not found because those lines aren't commented out.

This PR fixes that.

edc commented 7 years ago

Great! Thanks!