nix(feat): Add argbash bash completion support

This commit is contained in:
Wolfgang Walther
2021-04-18 13:51:39 +02:00
committed by Wolfgang Walther
parent c2df7d8198
commit 2559d32912
9 changed files with 113 additions and 68 deletions
+22 -15
View File
@@ -26,6 +26,7 @@ let
"ARG_POSITIONAL_SINGLE([command], [Command to run])"
"ARG_LEFTOVERS([command arguments])"
];
addCommandCompletion = true;
redirectTixFiles = false; # will be done by sub-command
inRootDir = true;
}
@@ -169,19 +170,25 @@ let
''
${hsieMinimalImports} graph-symbols | ${graphviz}/bin/dot -Tpng -o "$_arg_outfile"
'';
in
buildEnv {
name = "postgrest-devtools";
paths = [
watch.bin
pushCachix.bin
build.bin
run.bin
clean.bin
check.bin
dumpMinimalImports.bin
hsieMinimalImports.bin
hsieGraphModules.bin
hsieGraphSymbols.bin
tools = [
watch
pushCachix
build
run
clean
check
dumpMinimalImports
hsieMinimalImports
hsieGraphModules
hsieGraphSymbols
];
}
bashCompletion = builtins.map (tool: tool.bashCompletion) tools;
in
buildEnv
{
name = "postgrest-devtools";
paths = builtins.map (tool: tool.bin) tools;
} // { inherit bashCompletion; }