Skip to content

Commit

Permalink
Merge branch 'ohmyzsh:master' into omz-subexecutor
Browse files Browse the repository at this point in the history
  • Loading branch information
pepoluan committed May 2, 2024
2 parents 4c7cbfe + 8581ecd commit 972c663
Show file tree
Hide file tree
Showing 5 changed files with 9 additions and 5 deletions.
1 change: 1 addition & 0 deletions plugins/autojump/autojump.plugin.zsh
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion plugins/copybuffer/copybuffer.plugin.zsh
Original file line number Diff line number Diff line change
Expand Up @@ -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."
Expand Down
6 changes: 4 additions & 2 deletions plugins/fzf/fzf.plugin.zsh
Original file line number Diff line number Diff line change
@@ -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)"
}
Expand Down
2 changes: 1 addition & 1 deletion plugins/poetry-env/poetry-env.plugin.zsh
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
3 changes: 2 additions & 1 deletion themes/fishy.zsh-theme
Original file line number Diff line number Diff line change
Expand Up @@ -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%}"
Expand Down

0 comments on commit 972c663

Please sign in to comment.