6710fd588aec2c0cb90e70c02db0837c3646af99
Author Ennio Mara <enniomara@users.noreply.github.com> Committer GitHub <noreply@github.com> Date 2023-01-02 20:32 UTC
Message fix(autojump): fix autojump sourcing in nix (-darwin) (#11422)
* fix(autojump): fix autojump sourcing in nix (-darwin)
This plugin expects to source an sh/zsh file which sets up autojump, but
that is not done when running Nix on macos using nix-darwin. Looking at
the old value (/etc/profiles/per-user/$USER/bin/autojump), it points to a
binary file instead of the setup script.
* Use zsh file instead of sh
Diff 1 diff --git a/plugins/autojump/autojump.plugin.zsh b/plugins/autojump/autojump.plugin.zsh
2 index e11f231b64b9b605fe7b57c5526318c163d8912d..9bc190bdcd7eb08985235c21f403262cadc42d47 100644
3 --- a/plugins/autojump/autojump.plugin.zsh
4 +++ b/plugins/autojump/autojump.plugin.zsh
5 @@ -1,18 +1,18 @@
6 declare -a autojump_paths
7 autojump_paths=(
8 - $HOME/.autojump/etc/profile.d/autojump.zsh # manual installation
9 - $HOME/.autojump/share/autojump/autojump.zsh # manual installation
10 - $HOME/.nix-profile/etc/profile.d/autojump.sh # NixOS installation
11 - /run/current-system/sw/share/autojump/autojump.zsh # NixOS installation
12 - /usr/share/autojump/autojump.zsh # Debian and Ubuntu package
13 - /etc/profile.d/autojump.zsh # manual installation
14 - /etc/profile.d/autojump.sh # Gentoo installation
15 - /usr/local/share/autojump/autojump.zsh # FreeBSD installation
16 - /usr/pkg/share/autojump/autojump.zsh # NetBSD installation
17 - /opt/local/etc/profile.d/autojump.sh # macOS with MacPorts
18 - /usr/local/etc/profile.d/autojump.sh # macOS with Homebrew (default)
19 - /opt/homebrew/etc/profile.d/autojump.sh # macOS with Homebrew (default on M1 macs)
20 - /etc/profiles/per-user/$USER/bin/autojump # macOS Nix, Home Manager and flakes
21 + $HOME/.autojump/etc/profile.d/autojump.zsh # manual installation
22 + $HOME/.autojump/share/autojump/autojump.zsh # manual installation
23 + $HOME/.nix-profile/etc/profile.d/autojump.sh # NixOS installation
24 + /run/current-system/sw/share/autojump/autojump.zsh # NixOS installation
25 + /usr/share/autojump/autojump.zsh # Debian and Ubuntu package
26 + /etc/profile.d/autojump.zsh # manual installation
27 + /etc/profile.d/autojump.sh # Gentoo installation
28 + /usr/local/share/autojump/autojump.zsh # FreeBSD installation
29 + /usr/pkg/share/autojump/autojump.zsh # NetBSD installation
30 + /opt/local/etc/profile.d/autojump.sh # macOS with MacPorts
31 + /usr/local/etc/profile.d/autojump.sh # macOS with Homebrew (default)
32 + /opt/homebrew/etc/profile.d/autojump.sh # macOS with Homebrew (default on M1 macs)
33 + /etc/profiles/per-user/$USER/etc/profile.d/autojump.zsh # macOS Nix, Home Manager and flakes
34 )
35
36 for file in $autojump_paths; do