Your confusion seems to be related to this + echo --vendor 'Bleep\' Bloop . The reason this happens is because it prints what it will look like with the X extension. In other words, executing $X makes it possible to put independent โwords" --vendor , Bleep\ and Bloop on the command line. However, this means that Bloop\ is a word and does not allow \ interpreted to exit (space), it saves \ . If they are intended for parameters for another command, I would suggest doing either:
export X='--vendor "Bleep Bloop"'
or
export X="--vendor \"Bleep Bloop\""
but I'm 100% not sure if they work. If you want to save the parameters for a command that you could do:
# optional:
And then use them like:
echo ${ARGS[@]}
source share