diff options
| author | navewindre <boneyaard@gmail.com> | 2025-07-13 06:42:05 +0200 |
|---|---|---|
| committer | navewindre <boneyaard@gmail.com> | 2025-07-13 06:42:05 +0200 |
| commit | 02f14a9cb152561a5e44062aac79f3b700403b40 (patch) | |
| tree | 2db8ebda3b7f6f8777783aeb5c60018e6e1359d8 /home/.oh-my-zsh/plugins/last-working-dir/README.md | |
| parent | cbbdeb2f6b40a102a829f0c47cff052937231f00 (diff) | |
omz
Diffstat (limited to 'home/.oh-my-zsh/plugins/last-working-dir/README.md')
| -rw-r--r-- | home/.oh-my-zsh/plugins/last-working-dir/README.md | 33 |
1 files changed, 33 insertions, 0 deletions
diff --git a/home/.oh-my-zsh/plugins/last-working-dir/README.md b/home/.oh-my-zsh/plugins/last-working-dir/README.md new file mode 100644 index 0000000..b5cc558 --- /dev/null +++ b/home/.oh-my-zsh/plugins/last-working-dir/README.md @@ -0,0 +1,33 @@ +# last-working-dir plugin + +Keeps track of the last used working directory and automatically jumps into it +for new shells, unless the starting directory is not `$HOME`. + +Also adds a `lwd` function to jump to the last working directory. + +To use it, add `last-working-dir` to the plugins array in your zshrc file: + +```zsh +plugins=(... last-working-dir) +``` + +## Features + +### Use separate last-working-dir files with different SSH keys + +If the same user account is used by multiple users connecting via different SSH keys, you can +configure SSH to map them to different `SSH_USER`s and the plugin will use separate lwd files +for each one. + +Make sure that your SSH server allows environment variables. You can enable this feature +within the `/etc/sshd/sshd_config` file: + +``` +PermitUserEnvironment yes +``` + +Then, add `environment="SSH_USER=<SSH_USERNAME>"` before the SSH keys in your `authorized_keys` file: + +``` +environment="SSH_USER=a.test@example.com" ssh-ed25519 AAAAC3Nz... +``` |
