diff options
author | zimbatm <zimbatm@zimbatm.com> | 2016-05-05 19:49:17 +0100 |
---|---|---|
committer | zimbatm <zimbatm@zimbatm.com> | 2016-05-05 19:49:17 +0100 |
commit | fb23979833fa6885c939b3c9c9148219f2408040 (patch) | |
tree | 827afe415b8fc480830fb2296c370a09b701b2c4 | |
parent | 85b3613751a594dfa1111f5fb964d19ad896af3d (diff) | |
parent | fc0831500fc22d3da621141da711c388fd4e963f (diff) | |
download | nixlib-fb23979833fa6885c939b3c9c9148219f2408040.tar nixlib-fb23979833fa6885c939b3c9c9148219f2408040.tar.gz nixlib-fb23979833fa6885c939b3c9c9148219f2408040.tar.bz2 nixlib-fb23979833fa6885c939b3c9c9148219f2408040.tar.lz nixlib-fb23979833fa6885c939b3c9c9148219f2408040.tar.xz nixlib-fb23979833fa6885c939b3c9c9148219f2408040.tar.zst nixlib-fb23979833fa6885c939b3c9c9148219f2408040.zip |
Merge pull request #15213 from zimbatm/autojump-share
autojump: include a way to find the share dir
-rw-r--r-- | doc/package-notes.xml | 16 | ||||
-rw-r--r-- | pkgs/tools/misc/autojump/default.nix | 10 |
2 files changed, 23 insertions, 3 deletions
diff --git a/doc/package-notes.xml b/doc/package-notes.xml index 4148e87e0189..f0015a7f9ace 100644 --- a/doc/package-notes.xml +++ b/doc/package-notes.xml @@ -366,4 +366,20 @@ it. Place the resulting <filename>package.nix</filename> file into </section> +<section xml:id="sec-autojump"> + +<title>Autojump</title> + +<para> + autojump needs the shell integration to be useful but unlike other systems, + nix doesn't have a standard share directory location. This is why a + <command>autojump-share</command> script is shipped that prints the location + of the shared folder. This can then be used in the .bashrc like this: +<screen> + source "$(autojump-share)/autojump.bash" +</screen> +</para> + +</section> + </chapter> diff --git a/pkgs/tools/misc/autojump/default.nix b/pkgs/tools/misc/autojump/default.nix index 3bd44fb07b7e..f0dfee7882a1 100644 --- a/pkgs/tools/misc/autojump/default.nix +++ b/pkgs/tools/misc/autojump/default.nix @@ -22,9 +22,13 @@ in mkdir -p "$out/etc/bash_completion.d" cp -v $out/share/autojump/autojump.bash "$out/etc/bash_completion.d" - # FIXME: What's the right place for `autojump.zsh'? - # This can be used as a workaround in .zshrc: - # . $HOME/.nix-profile/share/autojump/autojump.zsh + cat <<SCRIPT > $out/bin/autojump-share + #!/bin/sh + # Run this script to find the autojump shared folder where all the shell + # integration scripts are living. + echo $out/share/autojump + SCRIPT + chmod +x $out/bin/autojump-share ''; meta = { |