Merge pull request #14526 from Profpatsch/fish-completions
fish: pick up completion files from other packages
This commit is contained in:
commit
03c6434756
@ -101,6 +101,9 @@ in
|
|||||||
end
|
end
|
||||||
'';
|
'';
|
||||||
|
|
||||||
|
# include programs that bring their own completions
|
||||||
|
environment.pathsToLink = [ "/share/fish/vendor_completions.d" ];
|
||||||
|
|
||||||
environment.systemPackages = [ pkgs.fish ];
|
environment.systemPackages = [ pkgs.fish ];
|
||||||
|
|
||||||
environment.shells = [
|
environment.shells = [
|
||||||
|
@ -59,6 +59,9 @@ stdenv.mkDerivation rec {
|
|||||||
'' + ''
|
'' + ''
|
||||||
sed -i "s|/sbin /usr/sbin||" \
|
sed -i "s|/sbin /usr/sbin||" \
|
||||||
"$out/share/fish/functions/__fish_complete_subcommand_root.fish"
|
"$out/share/fish/functions/__fish_complete_subcommand_root.fish"
|
||||||
|
|
||||||
|
# make fish pick up completions from nix profile
|
||||||
|
echo "set fish_complete_path (echo \$NIX_PROFILES | tr ' ' '\n')\"/share/fish/vendor_completions.d\" \$fish_complete_path" >> $out/share/fish/config.fish
|
||||||
'';
|
'';
|
||||||
|
|
||||||
meta = with stdenv.lib; {
|
meta = with stdenv.lib; {
|
||||||
|
@ -44,7 +44,7 @@ stdenv.mkDerivation rec {
|
|||||||
preInstall = ''
|
preInstall = ''
|
||||||
mkdir -p "$out/share/bash-completion/completions"
|
mkdir -p "$out/share/bash-completion/completions"
|
||||||
mkdir -p "$out/share/zsh/site-functions"
|
mkdir -p "$out/share/zsh/site-functions"
|
||||||
mkdir -p "$out/share/fish/completions"
|
mkdir -p "$out/share/fish/vendor_completions.d"
|
||||||
'';
|
'';
|
||||||
|
|
||||||
installFlags = [ "PREFIX=$(out)" ];
|
installFlags = [ "PREFIX=$(out)" ];
|
||||||
|
Loading…
x
Reference in New Issue
Block a user