diff options
author | zimbatm <zimbatm@zimbatm.com> | 2016-05-04 11:06:55 +0100 |
---|---|---|
committer | zimbatm <zimbatm@zimbatm.com> | 2016-05-04 11:08:41 +0100 |
commit | 5901a8c63b0792c41706765eb11dc525793208fa (patch) | |
tree | d6f5bcc6ced5fa326571bb322760e34f659dcead /pkgs/tools/misc/autojump/default.nix | |
parent | eecd06409f2c6cb93d54e63d26ee352b93719a7a (diff) | |
download | nixlib-5901a8c63b0792c41706765eb11dc525793208fa.tar nixlib-5901a8c63b0792c41706765eb11dc525793208fa.tar.gz nixlib-5901a8c63b0792c41706765eb11dc525793208fa.tar.bz2 nixlib-5901a8c63b0792c41706765eb11dc525793208fa.tar.lz nixlib-5901a8c63b0792c41706765eb11dc525793208fa.tar.xz nixlib-5901a8c63b0792c41706765eb11dc525793208fa.tar.zst nixlib-5901a8c63b0792c41706765eb11dc525793208fa.zip |
autojump: include a way to find the share dir
autojump-share is a new script that gives you the path to autojump's shared directory. It can then be used in the various shell's rc files to find and source the autojump integration. Eg: source "$(autojump-share)/autojump.bash" Fixes #3239
Diffstat (limited to 'pkgs/tools/misc/autojump/default.nix')
-rw-r--r-- | pkgs/tools/misc/autojump/default.nix | 10 |
1 files changed, 7 insertions, 3 deletions
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 = { |