improve bash and zsh
parent
38910f91fa
commit
3dba56b0a3
|
@ -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
|
||||||
|
```
|
||||||
|
|
|
@ -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
|
||||||
```
|
```
|
||||||
|
|
Loading…
Reference in New Issue