From ee69c14beb24c652707b2f6b2a9db0fa8b238d05 Mon Sep 17 00:00:00 2001 From: John Matczak <50644033+cidrmill@users.noreply.github.com> Date: Tue, 23 Apr 2024 01:54:00 -0700 Subject: [PATCH 1/5] feat(fishy): add color to username (#12369) --- themes/fishy.zsh-theme | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/themes/fishy.zsh-theme b/themes/fishy.zsh-theme index 2b8d559e5e64..3b975c8f464e 100644 --- a/themes/fishy.zsh-theme +++ b/themes/fishy.zsh-theme @@ -16,7 +16,8 @@ _fishy_collapsed_wd() { } local user_color='green'; [ $UID -eq 0 ] && user_color='red' -PROMPT='%n@%m %{$fg[$user_color]%}$(_fishy_collapsed_wd)%{$reset_color%}%(!.#.>) ' +local host_color='white'; [ -n "$SSH_CLIENT" ] || [ -n "$SSH_TTY" ] && host_color='yellow' +PROMPT='%{$fg[$user_color]%}%n%{$reset_color%}@%{$fg[$host_color]%}%m %{$fg[$user_color]%}$(_fishy_collapsed_wd)%{$reset_color%}%(!.#.>) ' PROMPT2='%{$fg[red]%}\ %{$reset_color%}' local return_status="%{$fg_bold[red]%}%(?..%?)%{$reset_color%}" From 5d2d35cd1741af19553007fe0cc5324744fc58fa Mon Sep 17 00:00:00 2001 From: Carlo Sala Date: Tue, 23 Apr 2024 16:21:21 +0200 Subject: [PATCH 2/5] fix(poetry-env): do not deactivate in a subdir Closes #12377 --- plugins/poetry-env/poetry-env.plugin.zsh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/plugins/poetry-env/poetry-env.plugin.zsh b/plugins/poetry-env/poetry-env.plugin.zsh index f98c177b4eaf..be46717d8f5b 100644 --- a/plugins/poetry-env/poetry-env.plugin.zsh +++ b/plugins/poetry-env/poetry-env.plugin.zsh @@ -6,7 +6,7 @@ _togglePoetryShell() { fi # Deactivate the current environment if moving out of a Poetry directory or into a different Poetry directory - if [[ $poetry_active -eq 1 ]] && { [[ $in_poetry_dir -eq 0 ]] || [[ "$PWD" != "$poetry_dir"* ]]; }; then + if [[ $poetry_active -eq 1 ]] && { [[ $in_poetry_dir -eq 0 ]] && [[ "$PWD" != "$poetry_dir"* ]]; }; then export poetry_active=0 unset poetry_dir deactivate From 803e1a784cd520f101d126b47deea3297e6a82fc Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marc=20Cornell=C3=A0?= Date: Thu, 25 Apr 2024 08:04:18 +0200 Subject: [PATCH 3/5] fix(copybuffer): prevent `which` alias usage (#12379) --- plugins/copybuffer/copybuffer.plugin.zsh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/plugins/copybuffer/copybuffer.plugin.zsh b/plugins/copybuffer/copybuffer.plugin.zsh index 88bda32a080f..e636d9730012 100644 --- a/plugins/copybuffer/copybuffer.plugin.zsh +++ b/plugins/copybuffer/copybuffer.plugin.zsh @@ -2,7 +2,7 @@ # onto the system clipboard copybuffer () { - if which clipcopy &>/dev/null; then + if builtin which clipcopy &>/dev/null; then printf "%s" "$BUFFER" | clipcopy else zle -M "clipcopy not found. Please make sure you have Oh My Zsh installed correctly." From 21963f4f678e69fb3154a1d43a33d531a5b3566d Mon Sep 17 00:00:00 2001 From: Carlo Sala Date: Tue, 30 Apr 2024 12:56:02 +0200 Subject: [PATCH 4/5] fix(fzf): support old `fzf` versions Closes #12387 --- plugins/fzf/fzf.plugin.zsh | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/plugins/fzf/fzf.plugin.zsh b/plugins/fzf/fzf.plugin.zsh index ac4370596418..3d29f1762b6c 100644 --- a/plugins/fzf/fzf.plugin.zsh +++ b/plugins/fzf/fzf.plugin.zsh @@ -1,8 +1,10 @@ function fzf_setup_using_fzf() { (( ${+commands[fzf]} )) || return 1 - local fzf_ver=${$(fzf --version)[1]} - is-at-least 0.48.0 $fzf_ver || return 1 + # we remove "fzf " prefix, this fixes really old fzf versions behaviour + # see https://github.com/ohmyzsh/ohmyzsh/issues/12387 + local fzf_ver=${"$(fzf --version)"#fzf } + is-at-least 0.48.0 ${${(s: :)fzf_ver}[1]} || return 1 eval "$(fzf --zsh)" } From 8581ecd462ab2714936398c54433ed1deddb2926 Mon Sep 17 00:00:00 2001 From: Antoine Date: Wed, 1 May 2024 11:04:12 +0200 Subject: [PATCH 5/5] feat(autojump): add `nix-darwin` install path (#12389) --- plugins/autojump/autojump.plugin.zsh | 1 + 1 file changed, 1 insertion(+) diff --git a/plugins/autojump/autojump.plugin.zsh b/plugins/autojump/autojump.plugin.zsh index 5a52e306799e..e385a2de80b5 100644 --- a/plugins/autojump/autojump.plugin.zsh +++ b/plugins/autojump/autojump.plugin.zsh @@ -15,6 +15,7 @@ autojump_paths=( /opt/homebrew/etc/profile.d/autojump.sh # macOS with Homebrew (default on M1 macs) /opt/pkg/share/autojump/autojump.zsh # macOS with pkgsrc /etc/profiles/per-user/$USER/etc/profile.d/autojump.sh # macOS Nix, Home Manager and flakes + /nix/var/nix/gcroots/current-system/sw/share/zsh/site-functions/autojump.zsh # macOS Nix, nix-darwin ) for file in $autojump_paths; do