improve bash and zsh

main
sudo pacman -Syu 2021-02-18 11:09:43 +07:00
parent 38910f91fa
commit 3dba56b0a3
2 changed files with 10 additions and 9 deletions

View File

@ -1,10 +1,6 @@
# [Zsh](https://wiki.archlinux.org/index.php/Zsh) # [Zsh](https://wiki.archlinux.org/index.php/Zsh)
Set default shell: ## macOS
```sh
chsh -s /usr/local/bin/zsh
```
To use latest zsh in macOS, install `zsh` with Homebrew. To use latest zsh in macOS, install `zsh` with Homebrew.
Then append to `/etc/shells`: Then append to `/etc/shells`:
@ -12,3 +8,9 @@ Then append to `/etc/shells`:
```txt ```txt
/usr/local/bin/zsh /usr/local/bin/zsh
``` ```
Set default shell:
```sh
chsh -s /usr/local/bin/zsh
```

View File

@ -1,4 +1,4 @@
# Bash # [Bash](https://wiki.archlinux.org/index.php/bash)
Add to `~/.bashrc`: Add to `~/.bashrc`:
@ -30,8 +30,7 @@ Shebang:
In macOS, Bash read `~/.bash_profile` not `~/.bashrc`, so edit `~/.bash_profile`: In macOS, Bash read `~/.bash_profile` not `~/.bashrc`, so edit `~/.bash_profile`:
```bash ```bash
[[ -f ~/.bashrc ]] && \ [[ -f ~/.bashrc ]] && source ~/.bashrc
source ~/.bashrc
``` ```
To use latest Bash, install `bash` with Homebrew. To use latest Bash, install `bash` with Homebrew.
@ -43,6 +42,6 @@ Then append to `/etc/shells`:
Set default shell Set default shell
``` ```sh
chsh -s /usr/local/bin/bash chsh -s /usr/local/bin/bash
``` ```