summaryrefslogtreecommitdiff
path: root/plugins/wd
diff options
context:
space:
mode:
authorAtk <atk@aaathats3as.com>2020-10-09 16:38:02 +0100
committerGitHub <noreply@github.com>2020-10-09 17:38:02 +0200
commit2abe4d6a2576f064c09ce78b32005e7437a93ee0 (patch)
treea156d29df04d95345c08b7df4a851fb1a3a71103 /plugins/wd
parent8c8fe2a1715df916f0b5d785fee32c8a4a40c05b (diff)
downloadzsh-2abe4d6a2576f064c09ce78b32005e7437a93ee0.tar.gz
zsh-2abe4d6a2576f064c09ce78b32005e7437a93ee0.tar.bz2
zsh-2abe4d6a2576f064c09ce78b32005e7437a93ee0.zip
wd: update to v0.5.1 (#9273)
Diffstat (limited to 'plugins/wd')
-rw-r--r--plugins/wd/wd.sh10
1 files changed, 5 insertions, 5 deletions
diff --git a/plugins/wd/wd.sh b/plugins/wd/wd.sh
index d5d38f25b..9085c5b7b 100644
--- a/plugins/wd/wd.sh
+++ b/plugins/wd/wd.sh
@@ -71,7 +71,7 @@ wd_print_msg()
wd_print_usage()
{
- cat <<- EOF
+ command cat <<- EOF
Usage: wd [command] [point]
Commands:
@@ -175,9 +175,9 @@ wd_add()
elif [[ $point =~ "[[:space:]]+" ]]
then
wd_exit_fail "Warp point should not contain whitespace"
- elif [[ $point == *:* ]]
+ elif [[ $point =~ : ]] || [[ $point =~ / ]]
then
- wd_exit_fail "Warp point cannot contain colons"
+ wd_exit_fail "Warp point contains illegal character (:/)"
elif [[ ${points[$point]} == "" ]] || [ ! -z "$force" ]
then
wd_remove "$point" > /dev/null
@@ -185,7 +185,7 @@ wd_add()
if (whence sort >/dev/null); then
local config_tmp=$(mktemp "${TMPDIR:-/tmp}/wd.XXXXXXXXXX")
# use 'cat' below to ensure we respect $WD_CONFIG as a symlink
- sort -o "${config_tmp}" "$WD_CONFIG" && cat "${config_tmp}" > "$WD_CONFIG" && rm "${config_tmp}"
+ command sort -o "${config_tmp}" "$WD_CONFIG" && command cat "${config_tmp}" > "$WD_CONFIG" && command rm "${config_tmp}"
fi
wd_export_static_named_directories
@@ -270,7 +270,7 @@ wd_ls()
wd_path()
{
wd_getdir "$1"
- echo "$(echo "$dir" | sed "s:${HOME}:~:g")"
+ echo "$(echo "$dir" | sed "s:~:${HOME}:g")"
}
wd_show()