big update
parent
a39a1624e8
commit
6b222adedf
|
@ -1,14 +1,5 @@
|
|||
# Bash
|
||||
|
||||
Read [Default Keyboard Shortcuts for Bash](https://catonmat.net/ftp/readline-emacs-editing-mode-cheat-sheet.pdf).
|
||||
|
||||
In macOS, Bash read `~/.bash_profile` not `~/.bashrc`, so edit `~/.bash_profile`:
|
||||
|
||||
```bash
|
||||
[[ -f ~/.bashrc ]] && \
|
||||
source ~/.bashrc
|
||||
```
|
||||
|
||||
Add to `~/.bashrc`:
|
||||
|
||||
```bash
|
||||
|
@ -26,6 +17,14 @@ Shebang:
|
|||
#!/usr/bin/env bash
|
||||
```
|
||||
|
||||
| Shorcut | Explain |
|
||||
| ------------ | ------------------------ |
|
||||
| `CTRL-A` | move to begining of line |
|
||||
| `CTRL-E` | move to end of line |
|
||||
| `CTRL-Right` | move forward a word |
|
||||
| `CTRL-Left` | move backward a word |
|
||||
| `CTRL-W` | clear the word behind |
|
||||
|
||||
## Bash completion
|
||||
|
||||
| Distribution | Package |
|
||||
|
@ -45,3 +44,25 @@ Add to `~/.bashrc`:
|
|||
[[ -f /usr/local/etc/bash_completion ]] && \
|
||||
source /usr/local/etc/bash_completion
|
||||
```
|
||||
|
||||
## macOS
|
||||
|
||||
In macOS, Bash read `~/.bash_profile` not `~/.bashrc`, so edit `~/.bash_profile`:
|
||||
|
||||
```bash
|
||||
[[ -f ~/.bashrc ]] && \
|
||||
source ~/.bashrc
|
||||
```
|
||||
|
||||
To use latest Bash, install `bash` from Homebrew.
|
||||
Then append to `/etc/shells`:
|
||||
|
||||
```txt
|
||||
/usr/local/bin/bash
|
||||
```
|
||||
|
||||
Set default shell
|
||||
|
||||
```
|
||||
chsh -s /usr/local/bin/bash
|
||||
```
|
||||
|
|
|
@ -1,19 +0,0 @@
|
|||
# [bat](https://github.com/sharkdp/bat)
|
||||
|
||||
| Distribution | Package |
|
||||
| ------------ | ------- |
|
||||
| Arch Linux | `bat` |
|
||||
| Ubuntu | `bat` |
|
||||
| Homebrew | `bat` |
|
||||
|
||||
Add to `~/.bashrc`:
|
||||
|
||||
```bash
|
||||
# Arch Linux, Ubuntu
|
||||
[[ -f /usr/bin/bat ]] && \
|
||||
alias cat="bat"
|
||||
|
||||
# Homebrew
|
||||
[[ -f /usr/local/bin/bat ]] && \
|
||||
alias cat="bat"
|
||||
```
|
|
@ -1,6 +0,0 @@
|
|||
# [diff-so-fancy](https://github.com/so-fancy/diff-so-fancy)
|
||||
|
||||
| Distribution | Package |
|
||||
| ------------ | --------------- |
|
||||
| Arch Linux | `diff-so-fancy` |
|
||||
| Homebrew | `diff-so-fancy` |
|
|
@ -1,19 +0,0 @@
|
|||
# [exa](https://github.com/ogham/exa)
|
||||
|
||||
| Distribution | Package |
|
||||
| ------------ | ------- |
|
||||
| Arch Linux | `exa` |
|
||||
| Ubuntu | `exa` |
|
||||
| Homebrew | `exa` |
|
||||
|
||||
Add to `~/.bashrc`:
|
||||
|
||||
```bash
|
||||
# Arch Linux, Ubuntu
|
||||
[[ -f /usr/bin/exa ]] && \
|
||||
alias ls="exa"
|
||||
|
||||
# Homebrew
|
||||
[[ -f /usr/local/bin/exa ]] && \
|
||||
alias ls="exa"
|
||||
```
|
|
@ -1,7 +1,6 @@
|
|||
# [fd](https://github.com/sharkdp/fd)
|
||||
|
||||
| Distribution | Package |
|
||||
| ------------ | --------- |
|
||||
| ------------ | ------- |
|
||||
| Arch Linux | `fd` |
|
||||
| Ubuntu | `fd-find` |
|
||||
| Homebrew | `fd` |
|
||||
|
|
|
@ -1,26 +1,8 @@
|
|||
# [fzf](https://wiki.archlinux.org/index.php/Fzf)
|
||||
|
||||
| Distribution | Package |
|
||||
| ------------ | ------- |
|
||||
| Arch Linux | `fzf` |
|
||||
| Ubuntu | `fzf` |
|
||||
| Homebrew | `fzf` |
|
||||
|
||||
Add to `~/.bashrc`:
|
||||
|
||||
```bash
|
||||
# Arch Linux, Ubuntu
|
||||
[[ -f /usr/share/fzf/completion.bash ]] && \
|
||||
source /usr/share/fzf/completion.bash
|
||||
[[ -f /usr/share/fzf/key-bindings.bash ]] && \
|
||||
source /usr/share/fzf/key-bindings.bash
|
||||
|
||||
# Homebrew
|
||||
[[ -f /usr/local/opt/fzf/shell/completion.bash ]] && \
|
||||
source /usr/local/opt/fzf/shell/completion.bash
|
||||
[[ -f /usr/local/opt/fzf/shell/key-bindings.bash ]] && \
|
||||
source /usr/local/opt/fzf/shell/key-bindings.bash
|
||||
|
||||
# Use fd instead of find
|
||||
export FZF_DEFAULT_COMMAND='fd --hidden --exclude .git'
|
||||
export FZF_CTRL_T_COMMAND="$FZF_DEFAULT_COMMAND"
|
||||
|
|
|
@ -1,11 +1,5 @@
|
|||
# Git
|
||||
|
||||
| Distribution | Package |
|
||||
| ------------ | ------- |
|
||||
| Arch Linux | `git` |
|
||||
| Ubuntu | `git` |
|
||||
| Homebrew | `git` |
|
||||
|
||||
## Config
|
||||
|
||||
Aliases:
|
||||
|
|
|
@ -5,18 +5,15 @@
|
|||
- [Essential](Applications/Essential/README.md)
|
||||
- [Bash](Applications/Essential/Bash.md)
|
||||
- [Neovim](Applications/Essential/Neovim.md)
|
||||
- [bat](Applications/Essential/bat.md)
|
||||
- [diff-so-fancy](Applications/Essential/diff-so-fancy.md)
|
||||
- [exa](Applications/Essential/exa.md)
|
||||
- [fd](Applications/Essential/fd.md)
|
||||
- [fzf](Applications/Essential/fzf.md)
|
||||
- [git](Applications/Essential/git.md)
|
||||
- [ncdu](Applications/Essential/ncdu.md)
|
||||
- [ripgrep](Applications/Essential/ripgrep.md)
|
||||
- [rsync](Applications/Essential/rsync.md)
|
||||
- [tldr](Applications/Essential/tldr.md)
|
||||
- [tmux](Applications/Essential/tmux.md)
|
||||
- [Misc](Applications/Misc/README.md)
|
||||
- [ncdu](Applications/Misc/ncdu.md)
|
||||
- [Cheat](Applications/Misc/Cheat.md)
|
||||
- [Instaloader](Applications/Misc/Instaloader.md)
|
||||
- [Prettier](Applications/Misc/Prettier.md)
|
||||
|
|
Loading…
Reference in New Issue