Created
April 19, 2023 14:19
-
-
Save sneeu/9da3e663ff7432aae33d102c5af8d2a1 to your computer and use it in GitHub Desktop.
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
# "Secrets" are just environment variables--I can never remember `-Ugex` etc. | |
function secret | |
switch (count $argv) | |
case 0 # Usage | |
echo "Usage: secret <name> [value]" | |
echo " If value is not provided, the secret is unset." | |
case 1 # Unset | |
set -e -Ug $argv[1] | |
case 2 # Set | |
set -Ux $argv[1] $argv[2] | |
end | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment