mirror of
https://github.com/nix-community/home-manager.git
synced 2026-10-03 03:59:23 +00:00
The bash integration previously only ran `mise activate bash`, so tab completion for `mise` was never set up. Source the generated completion script via `mise completion bash --include-bash-completion-lib`; the flag self-bundles the bash-completion helpers so it also works on systems whose bash-completion predates `_comp_initialize`. Fixes #8539
23 lines
518 B
Nix
23 lines
518 B
Nix
{ pkgs, ... }:
|
|
{
|
|
programs = {
|
|
mise = {
|
|
package = pkgs.writeShellScriptBin "mise" ''
|
|
if [ "$1" = "completion" ]; then
|
|
echo "complete -F _mise mise"
|
|
fi
|
|
'';
|
|
enable = true;
|
|
enableBashIntegration = true;
|
|
};
|
|
|
|
bash.enable = true;
|
|
};
|
|
|
|
nmt.script = ''
|
|
assertFileRegex home-files/.bashrc 'eval "$(/nix/store/.*mise.*/bin/mise activate bash)"'
|
|
assertFileRegex home-files/.bashrc \
|
|
'^source /nix/store/[0-9a-z]*-mise-bash-completion.bash$'
|
|
'';
|
|
}
|