Skip to content

Instantly share code, notes, and snippets.

@cosmocatalano
Last active April 30, 2023 16:34
Show Gist options
  • Save cosmocatalano/077b4c0f5cf4ef7a452196037bf5ffd8 to your computer and use it in GitHub Desktop.
Save cosmocatalano/077b4c0f5cf4ef7a452196037bf5ffd8 to your computer and use it in GitHub Desktop.
zsh function with user-supplied parameter
hello() {
echo "Hello, $1"
}
# % hello world
# outputs
# Hello, world
twoParams() {
echo "$1, $2"
}
# % twoParams hello world
# outputs
# hello, world
# % twoParams goodbye "shitty-ass zsh docs"
# outputs
# goodbye shitty-ass zsh docs"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment