Last active
April 30, 2023 16:34
-
-
Save cosmocatalano/077b4c0f5cf4ef7a452196037bf5ffd8 to your computer and use it in GitHub Desktop.
zsh function with user-supplied parameter
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
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