Merge pull request #15213 from zimbatm/autojump-share
autojump: include a way to find the share dir
This commit is contained in:
commit
fb23979833
|
@ -366,4 +366,20 @@ it. Place the resulting <filename>package.nix</filename> file into
|
||||||
|
|
||||||
</section>
|
</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>
|
</chapter>
|
||||||
|
|
|
@ -22,9 +22,13 @@ in
|
||||||
mkdir -p "$out/etc/bash_completion.d"
|
mkdir -p "$out/etc/bash_completion.d"
|
||||||
cp -v $out/share/autojump/autojump.bash "$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'?
|
cat <<SCRIPT > $out/bin/autojump-share
|
||||||
# This can be used as a workaround in .zshrc:
|
#!/bin/sh
|
||||||
# . $HOME/.nix-profile/share/autojump/autojump.zsh
|
# 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 = {
|
meta = {
|
||||||
|
|
Loading…
Reference in New Issue