nix: bashCompletion -> bash-completion

This commit is contained in:
Robert Vollmert
2022-06-13 13:25:54 +02:00
parent 14c882a566
commit 34d0f34620
5 changed files with 12 additions and 12 deletions
+2 -2
View File
@@ -28,8 +28,8 @@ let
mkdir -p $out/bin
ln -s $hsie $out/bin/$name
'';
bashCompletion =
bash-completion =
runCommand "${name}-bash-completion" { inherit bin name; }
"$bin/bin/$name --bash-completion-script $bin/bin/$name > $out";
in
hsie // { inherit bashCompletion bin; }
hsie // { inherit bash-completion bin; }
+3 -3
View File
@@ -1,11 +1,11 @@
# Creates an environment that exposes bashCompletion arguments from all checkedShellScripts
# Creates an environment that exposes bash-completion arguments from all checkedShellScripts
{ buildEnv }:
{ name
, tools
, extra ? { }
}:
let
bashCompletion = builtins.map (tool: tool.bashCompletion) tools;
bash-completion = builtins.map (tool: tool.bash-completion) tools;
env = buildEnv {
inherit name;
@@ -13,4 +13,4 @@ let
};
in
env // { inherit bashCompletion; } // extra
env // { inherit bash-completion; } // extra
@@ -58,7 +58,7 @@ let
sed '/_positionals_count + 1/a\\t\t\t\tset -- "''${@:1:1}" "--" "''${@:2}"' -i $out
'';
bashCompletion =
bash-completion =
runCommand "${name}-completion" { } (
''
${argbash}/bin/argbash --type completion --strip all ${argsTemplate}/${name}.m4 > $out
@@ -138,4 +138,4 @@ let
script =
runCommand name { inherit bin name; } "ln -s $bin/bin/$name $out";
in
script // { inherit bin bashCompletion; }
script // { inherit bin bash-completion; }
+1 -1
View File
@@ -1,4 +1,4 @@
{ bashCompletion
{ bash-completion
, buildToolbox
, cabal-install
, checkedShellScript
+4 -4
View File
@@ -48,14 +48,14 @@ lib.overrideDerivation postgrest.env (
''
export HISTFILE=.history
source ${pkgs.bashCompletion}/etc/profile.d/bash_completion.sh
source ${pkgs.bash-completion}/etc/profile.d/bash_completion.sh
source ${pkgs.git}/share/git/contrib/completion/git-completion.bash
source ${postgrest.hsie.bashCompletion}
source ${postgrest.hsie.bash-completion}
''
+ builtins.concatStringsSep "\n" (
builtins.map (bashCompletion: "source ${bashCompletion}") (
builtins.concatLists (builtins.map (toolbox: toolbox.bashCompletion) toolboxes)
builtins.map (bash-completion: "source ${bash-completion}") (
builtins.concatLists (builtins.map (toolbox: toolbox.bash-completion) toolboxes)
)
);
}