Diff
1diff --git a/.github/dependencies.yml b/.github/dependencies.yml
2index 2be4cdfb085ffc77d40fb1ebaf24ba00ec04e741..d53b0cd4dd8f79402a90aac992c01d5a70ced511 100644
3--- a/.github/dependencies.yml
4+++ b/.github/dependencies.yml
5@@ -28,7 +28,7 @@ dependencies:
6 plugins/wd:
7 repo: mfaerevaag/wd
8 branch: master
9- version: tag:v0.9.0
10+ version: tag:v0.9.1
11 precopy: |
12 set -e
13 rm -r test
14diff --git a/plugins/wd/wd.sh b/plugins/wd/wd.sh
15index ddd31e6f672d53f70de075e8b0b678a62e65c373..66435a2a6aa1d7c4791d552033dcb63c5d09c56b 100755
16--- a/plugins/wd/wd.sh
17+++ b/plugins/wd/wd.sh
18@@ -8,7 +8,7 @@
19 # @github.com/mfaerevaag/wd
20
21 # version
22-readonly WD_VERSION=0.9.0
23+readonly WD_VERSION=0.9.1
24
25 # colors
26 readonly WD_BLUE="\033[96m"
27@@ -59,7 +59,7 @@ wd_print_msg()
28 then
29 local color="${1:-$WD_BLUE}" # Default to blue if no color is provided
30 local msg="$2"
31-
32+
33 if [[ -z "$msg" ]]; then
34 print "${WD_RED}*${WD_NOC} Could not print message. Sorry!"
35 else
36@@ -344,6 +344,7 @@ wd_path()
37 wd_show()
38 {
39 local name_arg=$1
40+ local show_pwd
41 # if there's an argument we look up the value
42 if [[ -n $name_arg ]]
43 then
44@@ -358,12 +359,12 @@ wd_show()
45 local wd_matches
46 wd_matches=()
47 # do a reverse lookup to check whether PWD is in $points
48- PWD="${PWD/$HOME/~}"
49- if [[ ${points[(r)$PWD]} == "$PWD" ]]
50+ show_pwd="${PWD/$HOME/~}"
51+ if [[ ${points[(r)$show_pwd]} == "$show_pwd" ]]
52 then
53 for name in ${(k)points}
54 do
55- if [[ $points[$name] == "$PWD" ]]
56+ if [[ $points[$name] == "$show_pwd" ]]
57 then
58 wd_matches[$(($#wd_matches+1))]=$name
59 fi
60@@ -371,7 +372,7 @@ wd_show()
61
62 wd_print_msg "$WD_BLUE" "$#wd_matches warp point(s) to current directory: ${WD_GREEN}$wd_matches${WD_NOC}"
63 else
64- wd_print_msg "$WD_YELLOW" "No warp point to $(echo "$PWD" | sed "s:$HOME:~:")"
65+ wd_print_msg "$WD_YELLOW" "No warp point to $show_pwd"
66 fi
67 fi
68 }