1
0
mirror of https://github.com/ohmyzsh/ohmyzsh.git synced 2026-02-12 05:49:47 +08:00

Compare commits

...

2 Commits

Author SHA1 Message Date
Antoine
8581ecd462
feat(autojump): add nix-darwin install path (#12389) 2024-05-01 11:04:12 +02:00
Carlo Sala
21963f4f67
fix(fzf): support old fzf versions
Closes #12387
2024-04-30 12:57:05 +02:00
2 changed files with 5 additions and 2 deletions

View File

@ -15,6 +15,7 @@ autojump_paths=(
/opt/homebrew/etc/profile.d/autojump.sh # macOS with Homebrew (default on M1 macs) /opt/homebrew/etc/profile.d/autojump.sh # macOS with Homebrew (default on M1 macs)
/opt/pkg/share/autojump/autojump.zsh # macOS with pkgsrc /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 /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 for file in $autojump_paths; do

View File

@ -1,8 +1,10 @@
function fzf_setup_using_fzf() { function fzf_setup_using_fzf() {
(( ${+commands[fzf]} )) || return 1 (( ${+commands[fzf]} )) || return 1
local fzf_ver=${$(fzf --version)[1]} # we remove "fzf " prefix, this fixes really old fzf versions behaviour
is-at-least 0.48.0 $fzf_ver || return 1 # 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)" eval "$(fzf --zsh)"
} }