An open API service indexing awesome lists of open source software.

https://github.com/tatsuyafujisaki/script-cheat-sheet

Cheat sheets for various commands and scripts
https://github.com/tatsuyafujisaki/script-cheat-sheet

apt awk base64 bash batch binary curl cut ffmpeg gradle imagemagick npm pip powershell protoc sed sips xcodeproj zsh

Last synced: about 1 month ago
JSON representation

Cheat sheets for various commands and scripts

Awesome Lists containing this project

README

          

# How to denote required and optional arguments on the command line
* ``
* `[optional_argument]`

> Option-arguments are shown separated from their options by characters, except when the option-argument is enclosed in the '[' and ']' notation to indicate that it is optional.

https://pubs.opengroup.org/onlinepubs/9799919799/basedefs/V1_chap12.html

# Note
Zsh does not expand the tilde (~) in single or double quotes.

> initial tildes and equals signs are not expanded

http://zsh.sourceforge.net/Guide/zshguide05.html

# Best practices
## What is the recommended way to temporarily switch to a different directory?
- Using a parenthesized command aka subshell
- e.g. `(cd && ls)`
- Using `cd ` and `cd -`
- Using `pushd ` and `popd`

Decision tree
1. If your command can be written as a one-liner, use a subshell..
1. If you switch to several different directories in a row, use `pushd ` and `popd`.
1. Otherwise, use `cd ` and `cd -`.