Skip to content

Instantly share code, notes, and snippets.

@sneeu
Created April 19, 2023 14:19
Show Gist options
  • Save sneeu/9da3e663ff7432aae33d102c5af8d2a1 to your computer and use it in GitHub Desktop.
Save sneeu/9da3e663ff7432aae33d102c5af8d2a1 to your computer and use it in GitHub Desktop.
# "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