granted: support fish shell (#6549)

Due to fish being a non-POSIX shell, granted provides a separate wrapper
to be used by fish.
This commit is contained in:
Raine Godmaire 2025-03-07 14:29:16 -05:00 committed by GitHub
parent 04c915bcf1
commit 83f4629364
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
6 changed files with 34 additions and 2 deletions

View file

@ -15,6 +15,9 @@ in {
enableZshIntegration =
lib.hm.shell.mkZshIntegrationOption { inherit config; };
enableFishIntegration =
lib.hm.shell.mkFishIntegrationOption { inherit config; };
};
config = mkIf cfg.enable {
@ -27,5 +30,11 @@ in {
unset GRANTED_ALIAS_CONFIGURED
}
'';
programs.fish.functions.assume = mkIf cfg.enableFishIntegration ''
set -x GRANTED_ALIAS_CONFIGURED "true"
source ${package}/share/assume.fish
set -e GRANTED_ALIAS_CONFIGURED
'';
};
}