Commit bda9443
committed
Fix leaked pushd.
`z somedir` uses double `pushd` to tunnel the new path out past the
endlocal that restores the environment state. But it ended up leaving
a pushd on the dir stack.
This change exploits normal variable expansion to restore the dir stack
to its initial state while still successfully tunneling the new path out
past the endlocal.1 parent c0ff299 commit bda9443
1 file changed
+10
-1
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
106 | 106 | | |
107 | 107 | | |
108 | 108 | | |
109 | | - | |
| 109 | + | |
110 | 110 | | |
111 | 111 | | |
112 | 112 | | |
| |||
115 | 115 | | |
116 | 116 | | |
117 | 117 | | |
| 118 | + | |
| 119 | + | |
| 120 | + | |
| 121 | + | |
| 122 | + | |
| 123 | + | |
| 124 | + | |
| 125 | + | |
| 126 | + | |
118 | 127 | | |
0 commit comments