Merge pull request #27709 from binarin/fzf-share
fzf: add script for finding 'share' folder
This commit is contained in:
commit
25bb529245
@ -366,15 +366,33 @@ it. Place the resulting <filename>package.nix</filename> file into
|
|||||||
|
|
||||||
</section>
|
</section>
|
||||||
|
|
||||||
<section xml:id="sec-autojump">
|
<section xml:id="sec-shell-helpers">
|
||||||
|
|
||||||
<title>Autojump</title>
|
<title>Interactive shell helpers</title>
|
||||||
|
|
||||||
<para>
|
<para>
|
||||||
autojump needs the shell integration to be useful but unlike other systems,
|
Some packages provide the shell integration to be more useful. But
|
||||||
nix doesn't have a standard share directory location. This is why a
|
unlike other systems, nix doesn't have a standard share directory
|
||||||
<command>autojump-share</command> script is shipped that prints the location
|
location. This is why a bunch <command>PACKAGE-share</command>
|
||||||
of the shared folder. This can then be used in the .bashrc like this:
|
scripts are shipped that print the location of the corresponding
|
||||||
|
shared folder.
|
||||||
|
|
||||||
|
Current list of such packages is as following:
|
||||||
|
|
||||||
|
<itemizedlist>
|
||||||
|
<listitem>
|
||||||
|
<para>
|
||||||
|
<literal>autojump</literal>: <command>autojump-share</command>
|
||||||
|
</para>
|
||||||
|
</listitem>
|
||||||
|
<listitem>
|
||||||
|
<para>
|
||||||
|
<literal>fzf</literal>: <command>fzf-share</command>
|
||||||
|
</para>
|
||||||
|
</listitem>
|
||||||
|
</itemizedlist>
|
||||||
|
|
||||||
|
E.g. <literal>autojump</literal> can then used in the .bashrc like this:
|
||||||
<screen>
|
<screen>
|
||||||
source "$(autojump-share)/autojump.bash"
|
source "$(autojump-share)/autojump.bash"
|
||||||
</screen>
|
</screen>
|
||||||
|
@ -39,7 +39,15 @@ buildGoPackage rec {
|
|||||||
cp -r $src/man/man1 $man/share/man
|
cp -r $src/man/man1 $man/share/man
|
||||||
mkdir -p $out/share/vim-plugins
|
mkdir -p $out/share/vim-plugins
|
||||||
ln -s $out/share/go/src/github.com/junegunn/fzf $out/share/vim-plugins/${name}
|
ln -s $out/share/go/src/github.com/junegunn/fzf $out/share/vim-plugins/${name}
|
||||||
cp -R $src/shell $out/share/shell
|
|
||||||
|
cp -R $src/shell $bin/share/fzf
|
||||||
|
cat <<SCRIPT > $bin/bin/fzf-share
|
||||||
|
#!/bin/sh
|
||||||
|
# Run this script to find the fzf shared folder where all the shell
|
||||||
|
# integration scripts are living.
|
||||||
|
echo $bin/share/fzf
|
||||||
|
SCRIPT
|
||||||
|
chmod +x $bin/bin/fzf-share
|
||||||
'';
|
'';
|
||||||
|
|
||||||
meta = with stdenv.lib; {
|
meta = with stdenv.lib; {
|
||||||
|
Loading…
Reference in New Issue
Block a user