1 # last-working-dir plugin
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`.
6 Also adds a `lwd` function to jump to the last working directory.
8 To use it, add `last-working-dir` to the plugins array in your zshrc file:
11 plugins=(... last-working-dir)
16 ### Use separate last-working-dir files with different SSH keys
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
22 Make sure that your SSH server allows environment variables. You can enable this feature
23 within the `/etc/sshd/sshd_config` file:
26 PermitUserEnvironment yes
29 Then, add `environment="SSH_USER=<SSH_USERNAME>"` before the SSH keys in your `authorized_keys` file:
32 environment="SSH_USER=a.test@example.com" ssh-ed25519 AAAAC3Nz...