mirror of
https://github.com/ohmyzsh/ohmyzsh.git
synced 2024-11-25 15:20:08 +00:00
wd: update to v0.5.1 (#9273)
This commit is contained in:
parent
8c8fe2a171
commit
2abe4d6a25
1 changed files with 5 additions and 5 deletions
|
@ -71,7 +71,7 @@ wd_print_msg()
|
||||||
|
|
||||||
wd_print_usage()
|
wd_print_usage()
|
||||||
{
|
{
|
||||||
cat <<- EOF
|
command cat <<- EOF
|
||||||
Usage: wd [command] [point]
|
Usage: wd [command] [point]
|
||||||
|
|
||||||
Commands:
|
Commands:
|
||||||
|
@ -175,9 +175,9 @@ wd_add()
|
||||||
elif [[ $point =~ "[[:space:]]+" ]]
|
elif [[ $point =~ "[[:space:]]+" ]]
|
||||||
then
|
then
|
||||||
wd_exit_fail "Warp point should not contain whitespace"
|
wd_exit_fail "Warp point should not contain whitespace"
|
||||||
elif [[ $point == *:* ]]
|
elif [[ $point =~ : ]] || [[ $point =~ / ]]
|
||||||
then
|
then
|
||||||
wd_exit_fail "Warp point cannot contain colons"
|
wd_exit_fail "Warp point contains illegal character (:/)"
|
||||||
elif [[ ${points[$point]} == "" ]] || [ ! -z "$force" ]
|
elif [[ ${points[$point]} == "" ]] || [ ! -z "$force" ]
|
||||||
then
|
then
|
||||||
wd_remove "$point" > /dev/null
|
wd_remove "$point" > /dev/null
|
||||||
|
@ -185,7 +185,7 @@ wd_add()
|
||||||
if (whence sort >/dev/null); then
|
if (whence sort >/dev/null); then
|
||||||
local config_tmp=$(mktemp "${TMPDIR:-/tmp}/wd.XXXXXXXXXX")
|
local config_tmp=$(mktemp "${TMPDIR:-/tmp}/wd.XXXXXXXXXX")
|
||||||
# use 'cat' below to ensure we respect $WD_CONFIG as a symlink
|
# 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
|
fi
|
||||||
|
|
||||||
wd_export_static_named_directories
|
wd_export_static_named_directories
|
||||||
|
@ -270,7 +270,7 @@ wd_ls()
|
||||||
wd_path()
|
wd_path()
|
||||||
{
|
{
|
||||||
wd_getdir "$1"
|
wd_getdir "$1"
|
||||||
echo "$(echo "$dir" | sed "s:${HOME}:~:g")"
|
echo "$(echo "$dir" | sed "s:~:${HOME}:g")"
|
||||||
}
|
}
|
||||||
|
|
||||||
wd_show()
|
wd_show()
|
||||||
|
|
Loading…
Reference in a new issue