Shortcuts
Shortcuts: Aliases and Small Functions, Startup Files: .bashrc, .zshrc and source, A Prompt in Your Colors.
Updated
- Aliases and Small Functions (Apprentice): An alias gives a long command a short name, such as ll for ls -lah, and a small function does the same for a job that needs the word you type after it, such as mkcd to make a folder and go into it.
- Startup Files: .bashrc, .zshrc and source (Apprentice): Bash reads ~/.bashrc every time a terminal opens, and a Mac's zsh reads ~/.zshrc, so aliases and functions you add there are always ready; keep a backup before you edit it, and use source to load your changes into the shell you're in.
- A Prompt in Your Colors (Journeyman): The prompt is the text in a variable, PS1, so you choose what it shows with codes such as \W for the folder and \A for the time, color it with \[\e[…m\] codes, show the Git branch with __git_ps1, and keep it in ~/.bashrc.