mirror of
https://github.com/ohmyzsh/ohmyzsh.git
synced 2025-07-14 07:59:00 +08:00
feat(wd): update to v0.10.1 (#13192)
Co-authored-by: ohmyzsh[bot] <54982679+ohmyzsh[bot]@users.noreply.github.com>
This commit is contained in:
parent
01433503c2
commit
f9d3e0ff56
2
.github/dependencies.yml
vendored
2
.github/dependencies.yml
vendored
@ -30,7 +30,7 @@ dependencies:
|
|||||||
plugins/wd:
|
plugins/wd:
|
||||||
repo: mfaerevaag/wd
|
repo: mfaerevaag/wd
|
||||||
branch: master
|
branch: master
|
||||||
version: tag:v0.10.0
|
version: tag:v0.10.1
|
||||||
precopy: |
|
precopy: |
|
||||||
set -e
|
set -e
|
||||||
rm -r test
|
rm -r test
|
||||||
|
@ -65,12 +65,9 @@ Add the following to your `home.nix` then run `home-manager switch`:
|
|||||||
programs.zsh.plugins = [
|
programs.zsh.plugins = [
|
||||||
{
|
{
|
||||||
name = "wd";
|
name = "wd";
|
||||||
src = pkgs.fetchFromGitHub {
|
src = pkgs.zsh-wd;
|
||||||
owner = "mfaerevaag";
|
file = "share/wd/wd.plugin.zsh";
|
||||||
repo = "wd";
|
completions = [ "share/zsh/site-functions" ];
|
||||||
rev = "v0.5.2";
|
|
||||||
sha256 = "sha256-4yJ1qhqhNULbQmt6Z9G22gURfDLe30uV1ascbzqgdhg=";
|
|
||||||
};
|
|
||||||
}
|
}
|
||||||
];
|
];
|
||||||
```
|
```
|
||||||
|
@ -8,7 +8,7 @@
|
|||||||
# @github.com/mfaerevaag/wd
|
# @github.com/mfaerevaag/wd
|
||||||
|
|
||||||
# version
|
# version
|
||||||
readonly WD_VERSION=0.10.0
|
readonly WD_VERSION=0.10.1
|
||||||
|
|
||||||
# colors
|
# colors
|
||||||
readonly WD_BLUE="\033[96m"
|
readonly WD_BLUE="\033[96m"
|
||||||
@ -174,6 +174,11 @@ wd_add()
|
|||||||
point=$(basename "$PWD")
|
point=$(basename "$PWD")
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
if [ ! -w "$wd_config_file" ]; then
|
||||||
|
wd_exit_fail "\'$wd_config_file\' is not writeable."
|
||||||
|
return
|
||||||
|
fi
|
||||||
|
|
||||||
if [[ $point =~ "^[\.]+$" ]]
|
if [[ $point =~ "^[\.]+$" ]]
|
||||||
then
|
then
|
||||||
wd_exit_fail "Warp point cannot be just dots"
|
wd_exit_fail "Warp point cannot be just dots"
|
||||||
@ -239,6 +244,11 @@ wd_remove()
|
|||||||
point_list=$(basename "$PWD")
|
point_list=$(basename "$PWD")
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
if [ ! -w "$wd_config_file" ]; then
|
||||||
|
wd_exit_fail "\'$wd_config_file\' is not writeable."
|
||||||
|
return
|
||||||
|
fi
|
||||||
|
|
||||||
for point_name in $point_list ; do
|
for point_name in $point_list ; do
|
||||||
if [[ ${points[$point_name]} != "" ]]
|
if [[ ${points[$point_name]} != "" ]]
|
||||||
then
|
then
|
||||||
@ -440,6 +450,11 @@ wd_clean() {
|
|||||||
local count=0
|
local count=0
|
||||||
local wd_tmp=""
|
local wd_tmp=""
|
||||||
|
|
||||||
|
if [ ! -w "$wd_config_file" ]; then
|
||||||
|
wd_exit_fail "\'$wd_config_file\' is not writeable."
|
||||||
|
return
|
||||||
|
fi
|
||||||
|
|
||||||
while read -r line
|
while read -r line
|
||||||
do
|
do
|
||||||
if [[ $line != "" ]]
|
if [[ $line != "" ]]
|
||||||
@ -543,14 +558,6 @@ args=$(getopt -o a:r:c:lhs -l add:,rm:,clean,list,ls:,open:,path:,help,show -- $
|
|||||||
if [[ ($? -ne 0 || $#* -eq 0) && -z $wd_print_version ]]
|
if [[ ($? -ne 0 || $#* -eq 0) && -z $wd_print_version ]]
|
||||||
then
|
then
|
||||||
wd_print_usage
|
wd_print_usage
|
||||||
|
|
||||||
# check if config file is writeable
|
|
||||||
elif [ ! -w "$wd_config_file" ]
|
|
||||||
then
|
|
||||||
# do nothing
|
|
||||||
# can't run `exit`, as this would exit the executing shell
|
|
||||||
wd_exit_fail "\'$wd_config_file\' is not writeable."
|
|
||||||
|
|
||||||
else
|
else
|
||||||
# parse rest of options
|
# parse rest of options
|
||||||
local wd_o
|
local wd_o
|
||||||
|
Loading…
x
Reference in New Issue
Block a user