1
0
mirror of https://github.com/robbyrussell/oh-my-zsh.git synced 2026-02-12 20:31:00 +01:00

2 Commits

Author SHA1 Message Date
Kalle Ahlström
cb72d7dcbf fix(af-magic): fix venv prompt counting parenthesis (#13190) 2025-06-29 17:11:47 +02:00
ohmyzsh[bot]
f9d3e0ff56 feat(wd): update to v0.10.1 (#13192)
Co-authored-by: ohmyzsh[bot] <54982679+ohmyzsh[bot]@users.noreply.github.com>
2025-06-29 17:09:07 +02:00
4 changed files with 21 additions and 17 deletions

View File

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

View File

@@ -65,12 +65,9 @@ Add the following to your `home.nix` then run `home-manager switch`:
programs.zsh.plugins = [
{
name = "wd";
src = pkgs.fetchFromGitHub {
owner = "mfaerevaag";
repo = "wd";
rev = "v0.5.2";
sha256 = "sha256-4yJ1qhqhNULbQmt6Z9G22gURfDLe30uV1ascbzqgdhg=";
};
src = pkgs.zsh-wd;
file = "share/wd/wd.plugin.zsh";
completions = [ "share/zsh/site-functions" ];
}
];
```

View File

@@ -8,7 +8,7 @@
# @github.com/mfaerevaag/wd
# version
readonly WD_VERSION=0.10.0
readonly WD_VERSION=0.10.1
# colors
readonly WD_BLUE="\033[96m"
@@ -174,6 +174,11 @@ wd_add()
point=$(basename "$PWD")
fi
if [ ! -w "$wd_config_file" ]; then
wd_exit_fail "\'$wd_config_file\' is not writeable."
return
fi
if [[ $point =~ "^[\.]+$" ]]
then
wd_exit_fail "Warp point cannot be just dots"
@@ -239,6 +244,11 @@ wd_remove()
point_list=$(basename "$PWD")
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
if [[ ${points[$point_name]} != "" ]]
then
@@ -440,6 +450,11 @@ wd_clean() {
local count=0
local wd_tmp=""
if [ ! -w "$wd_config_file" ]; then
wd_exit_fail "\'$wd_config_file\' is not writeable."
return
fi
while read -r line
do
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 ]]
then
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
# parse rest of options
local wd_o

View File

@@ -14,7 +14,7 @@ function afmagic_dashes {
if [[ -n "$python_env" && "$PS1" = *\(${python_env}\)* ]]; then
echo $(( COLUMNS - ${#python_env} - 3 ))
elif [[ -n "$VIRTUAL_ENV_PROMPT" && "$PS1" = *${VIRTUAL_ENV_PROMPT}* ]]; then
echo $(( COLUMNS - ${#VIRTUAL_ENV_PROMPT} ))
echo $(( COLUMNS - ${#VIRTUAL_ENV_PROMPT} - 3 ))
else
echo $COLUMNS
fi