Skip to main content

You are not logged in. Your edit will be placed in a queue until it is peer reviewed.

We welcome edits that make the post easier to understand and more valuable for readers. Because community members review edits, please try to make the post substantially better than how you found it, for example, by fixing grammar or adding additional resources and hyperlinks.

Required fields*

9
  • Which OS do you use? What's your bash version (echo $BASH_VERSION or bash --version)? I can't even create this variable in bash, a variable name in bash must begin with alphabetic character or an underscore. Can you please also show the result of printenv | grep :: | cat -A? I want to see if there are some invisible characters there. Commented May 22, 2023 at 11:41
  • I am using git-bash on windows. BASH_VERSION=5.2.15(1)-release printenv | grep :: | cat -A shows !::=::\$ Commented May 22, 2023 at 11:43
  • 1
    As far as bash is concerned, this is an invalid name for an environment variable, and it doesn't provide tools to manipulate it. The best solution would be to figure out where it comes from: either it's set in Windows, or it's set by some common library that some terminal emulators use, or it's set by some buggy Windows compatibility code in the initialization of git-bash (before user init files). Investigating this requires Windows expertise and is off-topic here, I suggest Super User. Commented May 22, 2023 at 12:20
  • I see this question was closed as a duplicate, but the answers to the duplicate question don't provide a workaround, they just explain why it happens. Commented May 23, 2023 at 8:24
  • The question is still a duplicate though, because the dupe does ask how to remove it Commented Jul 20, 2023 at 14:30