From 30cd373657625958c2db3a8a02a6a186b9f2a57a Mon Sep 17 00:00:00 2001
From: Julien Moutinho <julm+julm-nix@sourcephile.fr>
Date: Sat, 8 Oct 2022 17:19:00 +0200
Subject: [PATCH] bash: enable completion on aliases

---
 home-manager/profiles/bash.nix | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/home-manager/profiles/bash.nix b/home-manager/profiles/bash.nix
index a8cad4c..3626cd2 100644
--- a/home-manager/profiles/bash.nix
+++ b/home-manager/profiles/bash.nix
@@ -43,6 +43,10 @@ programs.bash = {
     zfs-umount = "zfs-unmount";
   };
   initExtra = ''
+    # Alias completion
+    . ${pkgs.complete-alias}/bin/complete_alias
+    complete -F _complete_alias "''${!BASH_ALIASES[@]}"
+
     shopt -s globstar
     shopt -s histreedit
     shopt -s histverify
-- 
2.47.2