Implement custom bash_completion loading so it doesn't conflict with bashrc_forward plugin

This commit is contained in:
cubernetes 2026-10-16 15:55:34 +02:00
parent 70f4f215c0
commit e64ef32112

View file

@ -1,10 +1,14 @@
{ ... }:
{ pkgs, ... }:
{
programs.bash = {
enable = true;
enableCompletion = false;
initExtra = ''
[ "''${BASH_COMPLETION_VERSINFO-}" ] || unset -v BASH_COMPLETION_VERSINFO
if [[ ! -v BASH_COMPLETION_VERSINFO ]] &&
[[ -f "${pkgs.bash-completion}/etc/profile.d/bash_completion.sh" ]]; then
source "${pkgs.bash-completion}/etc/profile.d/bash_completion.sh"
fi
[ "$DISPLAY" ] && xset r rate 300 60