macOS bash

main
Tran Hau 2020-05-22 13:22:41 +07:00
parent a7ec05d0b9
commit e8bcbde824
3 changed files with 20 additions and 1 deletions

View File

@ -2,7 +2,14 @@
Read [Default Keyboard Shortcuts for Bash](https://catonmat.net/ftp/readline-emacs-editing-mode-cheat-sheet.pdf).
Bash completion:
In macOS, Bash read `~/.bash_profile` not `~/.bashrc`, so edit `~/.bash_profile`:
```bash
[[ -f ~/.bashrc ]] && \
source ~/.bashrc
```
## Bash completion
| Distribution | Package |
| ------------ | ----------------- |

View File

@ -4,10 +4,16 @@
| ------------ | ---------- |
| Archlinux | `bat` |
| Ubuntu | `rust-bat` |
| Homebrew | `bat` |
Add to `~/.bashrc`:
```bash
# Archlinux, Ubuntu
[[ -f /usr/bin/bat ]] && \
alias cat="bat"
# Homebrew
[[ -f /usr/local/bin/bat ]] && \
alias cat="bat"
```

View File

@ -4,10 +4,16 @@
| ------------ | ---------- |
| Archlinux | `exa` |
| Ubuntu | `rust-exa` |
| Homebrew | `exa` |
Add to `~/.bashrc`:
```bash
# Archlinux, Ubuntu
[[ -f /usr/bin/exa ]] && \
alias ls="exa"
# Homebrew
[[ -f /usr/local/bin/exa ]] && \
alias ls="exa"
```