]> src.twobees.de Git - dotfiles.git/blob - stow/oh-my-zsh/.oh-my-zsh/plugins/last-working-dir/README.md
initial
[dotfiles.git] / stow / oh-my-zsh / .oh-my-zsh / plugins / last-working-dir / README.md
1 # last-working-dir plugin
2
3 Keeps track of the last used working directory and automatically jumps into it
4 for new shells, unless the starting directory is not `$HOME`.
5
6 Also adds a `lwd` function to jump to the last working directory.
7
8 To use it, add `last-working-dir` to the plugins array in your zshrc file:
9
10 ```zsh
11 plugins=(... last-working-dir)
12 ```
13
14 ## Features
15
16 ### Use separate last-working-dir files with different SSH keys
17
18 If the same user account is used by multiple users connecting via different SSH keys, you can
19 configure SSH to map them to different `SSH_USER`s and the plugin will use separate lwd files
20 for each one.
21
22 Make sure that your SSH server allows environment variables. You can enable this feature
23 within the `/etc/sshd/sshd_config` file:
24
25 ```
26 PermitUserEnvironment yes
27 ```
28
29 Then, add `environment="SSH_USER=<SSH_USERNAME>"` before the SSH keys in your `authorized_keys` file:
30
31 ```
32 environment="SSH_USER=a.test@example.com" ssh-ed25519 AAAAC3Nz...
33 ```