mirror of
https://github.com/nix-community/home-manager.git
synced 2026-06-05 21:02:51 +00:00
carapace: ignoreCase option for case-insensitive completion
Add option for case-insensitive matching in carapace completions.
This commit is contained in:
committed by
Matthieu Coudron
parent
4ebb171bc5
commit
77c47a4542
@@ -27,9 +27,32 @@ in
|
||||
enableNushellIntegration = lib.hm.shell.mkNushellIntegrationOption { inherit config; };
|
||||
|
||||
enableZshIntegration = lib.hm.shell.mkZshIntegrationOption { inherit config; };
|
||||
|
||||
ignoreCase = lib.mkOption {
|
||||
type = lib.types.bool;
|
||||
default = false;
|
||||
description = ''
|
||||
Whether to enable case-insensitive matching for carapace completions.
|
||||
When enabled, the carapace binary is wrapped with {env}`CARAPACE_MATCH`
|
||||
set to `1`.
|
||||
'';
|
||||
};
|
||||
};
|
||||
|
||||
config = lib.mkIf cfg.enable {
|
||||
programs.carapace.package = lib.mkIf cfg.ignoreCase (
|
||||
pkgs.symlinkJoin {
|
||||
name = "carapace-wrapped";
|
||||
paths = [ pkgs.carapace ];
|
||||
nativeBuildInputs = [ pkgs.makeWrapper ];
|
||||
postBuild = ''
|
||||
wrapProgram $out/bin/carapace \
|
||||
--set CARAPACE_MATCH 1
|
||||
'';
|
||||
meta.mainProgram = "carapace";
|
||||
}
|
||||
);
|
||||
|
||||
home.packages = [ cfg.package ];
|
||||
|
||||
programs = {
|
||||
|
||||
Reference in New Issue
Block a user