oh-my-fish / plugin-foreign-env

Run foreign bash scripts and capture exported environment variables
MIT License
221 stars 15 forks source link

fenv newline #8

Closed jgillich closed 8 years ago

jgillich commented 8 years ago
jakob@thinkpad ~> fenv export PYTHON=python2

jakob@thinkpad ~> set -g -x PYTHON python2

Can the newline printed by fenv be removed? I use fenv to initialize the shell, so I get like 4 newlines every time. (I know I can pipe to /dev/null, but I don't think this is intended)

derekstavis commented 8 years ago

I tried very hard to suppress the extra line ending, but it's a side effect of how fish manages multiline strings stored in variables -- they are just lists, which to be restored needs to be used with printf "%s\n", thus causing zero-length outputs to be printed as new lines.

jgillich commented 8 years ago

Ah I guess I won't be getting rid of the pipe then. Thanks for the fast response!

derekstavis commented 8 years ago

You are welcome. Let's keep the issue open as far as it exists. While we don't fix it the best approach is to redirect to /dev/null