Created
August 24, 2026 07:58
-
-
Save wolfferine/281fc2783b397ee7c10f9f5ce2fee4b6 to your computer and use it in GitHub Desktop.
GAIS - what's the macos terminal command equivalent of the powershell command: ls variable:*;
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| The closest macOS Terminal (zsh/bash) equivalent to list all defined variables is the set command. | |
| ## 💻 The Commands | |
| * set: Displays all shell variables and local variables. | |
| * env: Displays only exported environment variables. | |
| ## 🔍 Key Differences | |
| * PowerShell's variable:* lists built-in, user, and global variables. | |
| * macOS set outputs both variables and shell functions. | |
| * To see only names and values without functions, use: | |
| set | grep -v '^[a-zA-Z0-9_]* ()' | |
| Would you like to find a specific variable, or do you need help exporting a variable so other applications can see it? | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment