Merge pull request #14526 from Profpatsch/fish-completions

fish: pick up completion files from other packages
This commit is contained in:
Tuomas Tynkkynen 2016-04-09 20:08:46 +03:00
commit 03c6434756
3 changed files with 7 additions and 1 deletions

View File

@ -101,6 +101,9 @@ in
end
'';
# include programs that bring their own completions
environment.pathsToLink = [ "/share/fish/vendor_completions.d" ];
environment.systemPackages = [ pkgs.fish ];
environment.shells = [

View File

@ -59,6 +59,9 @@ stdenv.mkDerivation rec {
'' + ''
sed -i "s|/sbin /usr/sbin||" \
"$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; {

View File

@ -44,7 +44,7 @@ stdenv.mkDerivation rec {
preInstall = ''
mkdir -p "$out/share/bash-completion/completions"
mkdir -p "$out/share/zsh/site-functions"
mkdir -p "$out/share/fish/completions"
mkdir -p "$out/share/fish/vendor_completions.d"
'';
installFlags = [ "PREFIX=$(out)" ];