I'm using Oh My Zsh, and was wondering if there is a way to create a function or alias to run multiple commands. Just as an example, running an 'update' command will update specific gems, but not all of them.
相关问题
- JQ: Select when attribute value exists in a bash a
- bash print whole line after splitting line with if
- “command not found” errors in expect script execut
- grep using grep results
- How can I add a horizontal line (“goal line”) for
相关文章
- Check if directory exists on remote machine with s
- Reverse four length of letters with sed in unix
- Launch interactive SSH bash session from PHP
- BASH: Basic if then and variable assignment
- Bash script that creates a directory structure
- Test if File/Dir exists over SSH/Sudo in Python/Ba
- How can I create a “tmp” directory with Elastic Be
- Spread 'sed' command over multiple lines
If there are many commands, I find it useful to alias the execution of a .sh file located on my home directory
To throw the alias inside the config file, you can do
As you've discovered, you can chain commands in a single alias using
;
:Alternatively, you can write a function very easily in your
~/.zshrc
file:For readability, I'd personally go for a function for anything that's semi-complex.