Add upstream oh_my_zsh repo

This commit is contained in:
2020-10-16 10:09:40 +05:00
parent 9fcc978a55
commit 1335bbb251
440 changed files with 14454 additions and 8085 deletions

View File

@@ -6,4 +6,10 @@ for new shells, unless:
- The plugin is already loaded.
- The current `$PWD` is not `$HOME`.
Adds `lwd` function to jump to the last working directory.
Also adds `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)
```

View File

@@ -2,7 +2,8 @@
typeset -g ZSH_LAST_WORKING_DIRECTORY
# Updates the last directory once directory is changed
chpwd_functions+=(chpwd_last_working_dir)
autoload -U add-zsh-hook
add-zsh-hook chpwd chpwd_last_working_dir
chpwd_last_working_dir() {
if [ "$ZSH_SUBSHELL" = 0 ]; then
local cache_file="$ZSH_CACHE_DIR/last-working-dir"