1
0
Fork 0
mirror of https://github.com/ohmyzsh/ohmyzsh.git synced 2024-11-14 09:50:08 +00:00

feat(wd): update to f0f47b71 (#12747)

Co-authored-by: ohmyzsh[bot] <54982679+ohmyzsh[bot]@users.noreply.github.com>
This commit is contained in:
ohmyzsh[bot] 2024-10-13 21:10:29 +02:00 committed by GitHub
parent d2d5155d41
commit a82f6c79ab
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 8 additions and 7 deletions

View file

@ -28,7 +28,7 @@ dependencies:
plugins/wd:
repo: mfaerevaag/wd
branch: master
version: tag:v0.9.0
version: tag:v0.9.1
precopy: |
set -e
rm -r test

View file

@ -8,7 +8,7 @@
# @github.com/mfaerevaag/wd
# version
readonly WD_VERSION=0.9.0
readonly WD_VERSION=0.9.1
# colors
readonly WD_BLUE="\033[96m"
@ -344,6 +344,7 @@ wd_path()
wd_show()
{
local name_arg=$1
local show_pwd
# if there's an argument we look up the value
if [[ -n $name_arg ]]
then
@ -358,12 +359,12 @@ wd_show()
local wd_matches
wd_matches=()
# do a reverse lookup to check whether PWD is in $points
PWD="${PWD/$HOME/~}"
if [[ ${points[(r)$PWD]} == "$PWD" ]]
show_pwd="${PWD/$HOME/~}"
if [[ ${points[(r)$show_pwd]} == "$show_pwd" ]]
then
for name in ${(k)points}
do
if [[ $points[$name] == "$PWD" ]]
if [[ $points[$name] == "$show_pwd" ]]
then
wd_matches[$(($#wd_matches+1))]=$name
fi
@ -371,7 +372,7 @@ wd_show()
wd_print_msg "$WD_BLUE" "$#wd_matches warp point(s) to current directory: ${WD_GREEN}$wd_matches${WD_NOC}"
else
wd_print_msg "$WD_YELLOW" "No warp point to $(echo "$PWD" | sed "s:$HOME:~:")"
wd_print_msg "$WD_YELLOW" "No warp point to $show_pwd"
fi
fi
}