Skip to content

Commit

Permalink
Unsetopt extended_glob in wd_show
Browse files Browse the repository at this point in the history
This fixes the behaviour described in #105 for my setup.
  • Loading branch information
tomterl authored and alpha-tango-kilo committed Oct 6, 2022
1 parent 88bb6ca commit a3ee1ec
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions wd.sh
Original file line number Diff line number Diff line change
Expand Up @@ -280,6 +280,8 @@ wd_path()
wd_show()
{
local name_arg=$1
setopt | grep -q extendedglob
local extglob=$?
# if there's an argument we look up the value
if [[ -n $name_arg ]]
then
Expand All @@ -290,6 +292,7 @@ wd_show()
wd_print_msg "$WD_GREEN" "Warp point: ${WD_GREEN}$name_arg${WD_NOC} -> $points[$name_arg]"
fi
else
[[ $extglob ]] && setopt noextendedglob
# hax to create a local empty array
local wd_matches
wd_matches=()
Expand All @@ -309,6 +312,7 @@ wd_show()
else
wd_print_msg "$WD_YELLOW" "No warp point to $(echo "$PWD" | sed "s:$HOME:~:")"
fi
[[ $extglob ]] && setopt extendedglob
fi
}

Expand Down

0 comments on commit a3ee1ec

Please sign in to comment.