When I run printenv one of the returned variables is !::=::\. I noticed that the variable exists because docker does not work correctly with it set.
$ printenv | grep ::
!::=::\
$ docker stack deploy keycloak -c keycloak.yml
unexpected environment "=::=::\"
I am using git-bash on windows. The strange thing is that this variable only exists when I am using some terminal emulators such as ConEmu, Window terminal, Git-bash terminal while it does not exist when using VSCode's builtin terminal.
Why does this variable exist, and how do I remove it?
I tried the following methods with no success:
$ unset !::
bash: :: unrecognized history modifier
$ unset !::
$ unset !::
$ echo $!::
::
$ env | grep ::
!::=::\
$ printenv | grep :: | cat -A
!::=::$
$ export !::=
bash: :: unrecognized history modifier
$ export !::=
bash: export: !::=: not a valid identifier
$ export $!::=
bash: export: ::=: not a valid identifier
$ set +H
$ unset !::
$ unset !::
$ env | grep ::
!::=::
The following works:
$ env -u \!:: env | grep::
$ env -u !:: docker stack deploy keycloack -c keycloak.yml
Creating network keycloack_default
...
My environment:
OS: Windows with git-bash (MSys based)
Bash version: 5.2.15(1)-release
bashversion (echo $BASH_VERSIONorbash --version)? I can't even create this variable in bash, a variable name inbashmust begin with alphabetic character or an underscore. Can you please also show the result ofprintenv | grep :: | cat -A? I want to see if there are some invisible characters there. – aviro May 22 '23 at 11:41BASH_VERSION=5.2.15(1)-releaseprintenv | grep :: | cat -Ashows!::=::\$– anderio Moga May 22 '23 at 11:43