How to set and use multiple parameters in single environmental variable in fish shell

fish

I want to use following in fish shell:

$ export arm='ARCH=arm CROSS_COMPILE=arm-eabi-'
$ make $arm 

This works fine in bash/zsh but not on fish shell.

But if I execute the following in fish shell:

$env tmp=arm make

this works fine.

Can someone please help me with this?

Best Answer

You're looking for set -x:

set -x arm 'ARCH=arm CROSS_COMPILE=arm-eabi-'

See the tutorial section on environment variables for more.

Related Question