Fix pwd calculation for git worktrees

A refactor changed this block from a `set git_dir $PWD` to
`set git_dir $real_pwd`, but as `real_pwd` is a "static" variable and
not dynamically computed, this breaks within the `pushd` / `popd` flow.

Instead of using `$real_pwd`, we need to compute the *current* directory
by calling `__bobthefish_pwd` again.

Fixes #249.
pull/351/head
Ramon Rüttimann 11 months ago committed by Justin Hileman
parent ed896b65c3
commit c2c47dc964

@ -185,7 +185,7 @@ function __bobthefish_git_project_dir -S -a real_pwd -d 'Print the current git p
or return
pushd $git_dir
set git_dir $real_pwd
set git_dir (__bobthefish_pwd)
popd
switch $real_pwd/

Loading…
Cancel
Save