Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
Menu
Open sidebar
adam.huang
Oh My Zsh
Commits
18effd77
Commit
18effd77
authored
May 11, 2018
by
Xiao Fan
Committed by
Marc Cornellà
May 11, 2018
Browse files
last-working-dir: disable chpwd_last_working_dir in subshells (#6817)
parent
e8c328cb
Changes
1
Show whitespace changes
Inline
Side-by-side
plugins/last-working-dir/last-working-dir.plugin.zsh
View file @
18effd77
...
...
@@ -4,8 +4,10 @@ typeset -g ZSH_LAST_WORKING_DIRECTORY
# Updates the last directory once directory is changed
chpwd_functions+
=(
chpwd_last_working_dir
)
chpwd_last_working_dir
()
{
if
[
"
$ZSH_SUBSHELL
"
=
0
]
;
then
local
cache_file
=
"
$ZSH_CACHE_DIR
/last-working-dir"
pwd
>
|
"
$cache_file
"
fi
}
# Changes directory to the last working directory
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment