diff options
author | Jörg Thalheim <Mic92@users.noreply.github.com> | 2018-02-28 21:23:53 +0000 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-02-28 21:23:53 +0000 |
commit | 47ce3021a94ceb8ac7c4f2a8d3a8e7808c7e1bab (patch) | |
tree | 541ccdd89d0002f9231b6b606df936f5ed05d97b | |
parent | 87d865232649d6ad11d7c960303fa26f441b4546 (diff) | |
parent | c58072309c69c8ef2fddc6db15545f1cc46a38cf (diff) | |
download | nixlib-47ce3021a94ceb8ac7c4f2a8d3a8e7808c7e1bab.tar nixlib-47ce3021a94ceb8ac7c4f2a8d3a8e7808c7e1bab.tar.gz nixlib-47ce3021a94ceb8ac7c4f2a8d3a8e7808c7e1bab.tar.bz2 nixlib-47ce3021a94ceb8ac7c4f2a8d3a8e7808c7e1bab.tar.lz nixlib-47ce3021a94ceb8ac7c4f2a8d3a8e7808c7e1bab.tar.xz nixlib-47ce3021a94ceb8ac7c4f2a8d3a8e7808c7e1bab.tar.zst nixlib-47ce3021a94ceb8ac7c4f2a8d3a8e7808c7e1bab.zip |
Merge pull request #36136 from hedning/nix-bash-completions-on-enableCompletion
programs/bash: install nix-bash-completions if completion is enabled
-rw-r--r-- | nixos/doc/manual/release-notes/rl-1803.xml | 7 | ||||
-rw-r--r-- | nixos/modules/programs/bash/bash.nix | 3 | ||||
-rw-r--r-- | pkgs/shells/nix-bash-completions/default.nix | 4 |
3 files changed, 12 insertions, 2 deletions
diff --git a/nixos/doc/manual/release-notes/rl-1803.xml b/nixos/doc/manual/release-notes/rl-1803.xml index 29b252753830..9f80dcc29341 100644 --- a/nixos/doc/manual/release-notes/rl-1803.xml +++ b/nixos/doc/manual/release-notes/rl-1803.xml @@ -430,6 +430,13 @@ following incompatible changes:</para> and <literal>stopJob</literal> provide an optional <literal>$user</literal> argument for that purpose. </para> </listitem> + <listitem> + <para> + Enabling bash completion on NixOS, <literal>programs.bash.enableCompletion</literal>, will now also enable + completion for the Nix command line tools by installing the + <link xlink:href="https://github.com/hedning/nix-bash-completions">nix-bash-completions</link> package. + </para> + </listitem> </itemizedlist> </section> diff --git a/nixos/modules/programs/bash/bash.nix b/nixos/modules/programs/bash/bash.nix index 1abdb4973a44..1a62f04972df 100644 --- a/nixos/modules/programs/bash/bash.nix +++ b/nixos/modules/programs/bash/bash.nix @@ -211,6 +211,9 @@ in "/share/bash-completion" ]; + environment.systemPackages = optional cfg.enableCompletion + pkgs.nix-bash-completions; + environment.shells = [ "/run/current-system/sw/bin/bash" "/var/run/current-system/sw/bin/bash" diff --git a/pkgs/shells/nix-bash-completions/default.nix b/pkgs/shells/nix-bash-completions/default.nix index fb6fa24ac334..c8582366d1a3 100644 --- a/pkgs/shells/nix-bash-completions/default.nix +++ b/pkgs/shells/nix-bash-completions/default.nix @@ -1,14 +1,14 @@ { stdenv, fetchFromGitHub }: stdenv.mkDerivation rec { - version = "0.6.3"; + version = "0.6.4"; name = "nix-bash-completions-${version}"; src = fetchFromGitHub { owner = "hedning"; repo = "nix-bash-completions"; rev = "v${version}"; - sha256 = "1zmk9f53xpwk5j6qqisjlddgm2fr68p1q6pn3wa14bd777lranhj"; + sha256 = "1kdysrfc8dx24q438wj3aisn64g2w5yb6mx91qa385p5hz7b1yz2"; }; # To enable lazy loading via. bash-completion we need a symlink to the script |