[notes] Finding where an environment variable came from in fish 0 ▲ Chris Krycho 45 days ago · Tech · hide · Fediverse post Because I often wonder this, and because fish makes it easy, and because writing it down here might help you and will definitely help me remember it! Assumed audience: Other software developers who use fish shell. Last night, I was trying to figure out where a particular environment variable had come from, and went searching1 for a way to figure that out. I was delighted, as I often am, to find that fish makes it incredibly easy. If you want to know where and how SOME_ENVIRONMENT_VARIABLE was set, you just type: $ set --show SOME_ENVIRONMENT_VARIABLE Fish will helpfully print out something like this (assuming SOME_ENVIRONMENT_VARIABLE was set to the string cool-beans, and was set with set -Ux SOME_ENVIRONMENT_VARIABLE cool-beans): $SOME_ENVIRONMENT_VARIABLE: set in universal scope, exported, with 1 elements $SOME_ENVIRONMENT_VARIABLE[1]: |cool-beans| This is one of those things that feels obvious once you first see it in action, and yet… As far as I know — and I’d be happy to be… Commenting on Bubbles has been removed. Why? If you want to talk about this post, write to the author, use the comments on their blog if it has them, or reply with a "RE:" post on your own blog. Suggestions? feedback@bubbles.town