Repository navigation
fish: pick up completion files from other packages - #14526
Conversation
|
By analyzing the blame information on this pull request, we identified @lovek323, @jgillich and @the-kenny to be potential reviewers |
There was a problem hiding this comment.
Because $NIX_PROFILES is an external input and echo is not consistent, see https://unix.stackexchange.com/questions/65803/why-is-printf-better-than-echo#65819
There was a problem hiding this comment.
But the way you're using it explodes even more badly if there's a % in the text.
Also the outer printf (that appends to $out/share/fish/config.fish) is being called with a constant string and makes the file not end in a newline.
af27c2a to
7d99570
Compare
Some packages bring their own completions in /share/fish/vendor_completions.d. Now they are picked up by fish from every path in NIX_PROFILES.
7d99570 to
a011083
Compare
|
@dezgeg you are right, I haven’t understood how |
|
Happy to merge? |
|
Looks good to me. I don't know anything about |
|
Well, there appears to be a 👍 from what seems another fish user, so that is covered. |
| ''; | ||
|
|
||
| # include programs that bring their own completions | ||
| environment.pathsToLink = [ "/share/fish/vendor_completions.d" ]; |
There was a problem hiding this comment.
When I set programs.fish.enable = true; and sudo nixos-rebuild switch on the nixos-unstable channel now, presumably because of this line, it fails with:
cannot create directory `/nix/store/m3rrr54qspwiwyzn4gjrys36km6jz1g6-system-path//share/fish/vendor_completions.d': No such file or directory at /nix/store/xz5k60frmvvrj16lf7b0d8h3p0l4l7xw-builder.pl line 186.
builder for ‘/nix/store/bm5q3hs3pnijrjx1yrr647pslmzl986g-system-path.drv’ failed with exit code 2
cannot build derivation ‘/nix/store/z8bwgpzs4wiiv72rm4anc4mx1ixph1w2-nixos-system-conway-16.09pre85931.125ffff.drv’: 1 dependencies couldn't be built
error: build of ‘/nix/store/z8bwgpzs4wiiv72rm4anc4mx1ixph1w2-nixos-system-conway-16.09pre85931.125ffff.drv’ failed
Any idea what's going on here?
There was a problem hiding this comment.
I believe this error only occurs if you have no packages containing /share/fish/vendor_completions.d, like me. When I add a package that contains that, like docker, then I do not get the above error.
Some packages bring their own completions in
/share/fish/vendor_completions.d. Now they are picked up by fish from
every path in NIX_PROFILES.
cc @aszlig