# zsh



[F.A.Q.](http://zsh.sourceforge.net/FAQ/)

[Manuel](http://zsh.sourceforge.net/Doc/Release/zsh_toc.html)

[Guide](http://zsh.sourceforge.net/Guide/zshguide.html)

[Moving to zsh](https://scriptingosx.com/2019/06/moving-to-zsh/)

[Mastering-zsh](https://github.com/rothgar/mastering-zsh)



##### cd automatique:

```
~ master
❯ Docu <tab><enter>

~/Documents master
❯
```



**Recursive path expansion:** 

```
~ master
❯ /u/lo/b <tab><enter>

/usr/local/bin
❯
```

```
~ master
❯ /U/b/doc <tab><enter>

~/Documents master
```



##### Auto correction:

```
❯ ce Documents
zsh: correct 'ce' to 'cd' [nyae]?
```

##### [nyae]?

`n`: **n**o. Ne corrige pas et exécute la commande entrée.

```bash
[bruno@silverbook/~] $ lx
zsh: correct 'lx' to 'ls' [nyae]? n
zsh: command not found: lx
```

`y`: **y**es. Corrige et exécute la modification suggérée par zsh.

```bash
[bruno@silverbook/~] $ lx
zsh: correct 'lx' to 'ls' [nyae]? y
Applications             Movies                   Sites
Applications (Parallels) Music                    SynologyDrive
Brewfile                 Nextcloud                backup_list.conf
Cloud                    OneDrive                 pCloud Drive
Desktop                  Parallels                path
Documents                Pictures                 plugins.d
Downloads                Public                   project
Dropbox                  PycharmProjects
Library                  Shared with me
```

`a`: **a**bort. Ne fait rien et affiche un nouveau prompt.

```bash
$ setfile
zsh: correct 'setfile' to 'SetFile' [nyae]? a
$
```

`e`: **e**dit. Editer la ligne.

```bash
$ setfile
zsh: correct 'setfile' to 'SetFile' [nyae]? e
$ setfile|
```



##### shebang:

```bash
#!/bin/zsh
```

##### Emuler sh:

```bash
#!/bin/zsh --emulate sh
```

