Shell or cli
Table of Contents
- link
- Tools
1. Better
- ls: exa
- grep: ripgrep, rg
- find: fd
- man: tldr/cht.sh
du: ncdu
alias du="ncdu --color dark -rr -x --exclude .git --exclude node_modules"
- cat: bat
ping: prettyping
alias ping='prettyping --nolegend'
- curl: httpie, http
2. Tools
zsh_stats:shows top 20 commands- foreman|goreman|forego: Manage multiple processes
git-chglog
git-chglog --config cfg.yaml --output changelog.md 1.1.0..
3. Shell Tips
3.1. Run the last command with sudo
- Refiled on
sudo !!
3.2. echo $(clippaste)
4. Startup files loading order (.bashrc, .profile, .zshrc etc)
4.1. For Bash
|
|
Interactive login |
Interactive non-login |
Script |
| /etc/profile | A | ||
| /etc/bash.bashrc | A | ||
| ~/.bashrc | B | ||
| ~/.bash_profile | B1 | ||
| ~/.bash_login | B2 | ||
| ~/.profile | B3 | ||
| BASH_ENV | A | ||
| ~/.bash_logout | C |
4.2. For Zsh
For zsh: [Note that zsh seems to read ~/.profile as well, if ~/.zshrc is not present.]
|
|
Interactive login |
Interactive non-login |
Script |
| /etc/zshenv | A | A | A |
| ~/.zshenv | B | B | B |
| /etc/zprofile | C | ||
| ~/.zprofile | D | ||
| /etc/zshrc | E | C | |
| ~/.zshrc | F | D | |
| /etc/zlogin | G | ||
| ~/.zlogin | H | ||
| ~/.zlogout | I | ||
| /etc/zlogout | J |