I have the following script:
foo="foo";
bar="bar";
separator=": ";
result="${foo}${separator}${bar}";
echo $result;
I expected to get foo: bar
, but the output was foo:bar
- the space was lost. What am I missing here?
Here is the code of the alias inside .gitconfig:
[alias]
vx = "!f() { foo="foo"; \
bar="bar"; \
separator=": "; \
result="${foo}${separator}${bar}"; \
echo $result; \
}; f"
P.S. I also tried result=${foo}${separator}${bar};
without double quotes - didn't work either.
P.P.S. I should note that this script is running in the confines of a .gitconfig alias.