SAVE GAME

This commit is contained in:
atagen 2026-03-23 02:17:42 +11:00
parent 5de8e62e66
commit 1d0d3465c1
7 changed files with 641 additions and 10 deletions

View file

@ -41,6 +41,15 @@ in
(discovered via XDG_DATA_DIRS).
'';
};
ignoreCommands = lib.mkOption {
type = lib.types.listOf lib.types.str;
default = [];
example = [ "meat" "problematic-tool" ];
description = ''
List of command names to skip during completion generation.
'';
};
};
config = lib.mkIf cfg.enable {
@ -62,6 +71,8 @@ in
chmod -R u+w "$_cur"
fi
fi'') segments;
ignoreFile = pkgs.writeText "inshellah-ignore" (lib.concatStringsSep "\n" cfg.ignoreCommands);
ignoreFlag = lib.optionalString (cfg.ignoreCommands != []) " --ignore ${ignoreFile}";
in
''
_cur="$out"
@ -71,7 +82,7 @@ in
# Generate all completions in one pass:
# native generators > manpages > --help fallback
if [ -d "$out/bin" ] && [ -d "$out/share/man" ]; then
${inshellah} generate "$out/bin" "$out/share/man" -o ${destDir} \
${inshellah} generate "$out/bin" "$out/share/man" -o ${destDir}${ignoreFlag} \
2>/dev/null || true
fi