]> git.phdru.name Git - dotfiles.git/commitdiff
Feat(.bashrc): Scan subdirectories in `$HOME/lib/config`
authorOleg Broytman <phd@phdru.name>
Thu, 20 Mar 2025 10:23:41 +0000 (13:23 +0300)
committerOleg Broytman <phd@phdru.name>
Thu, 20 Mar 2025 10:23:41 +0000 (13:23 +0300)
.bashrc

diff --git a/.bashrc b/.bashrc
index ce4af336cd1f7ab42a30e2f999b0291a15aed7f0..a403c7724bce1f7922658760a01cdab90bb8df65 100644 (file)
--- a/.bashrc
+++ b/.bashrc
@@ -161,7 +161,9 @@ fi
 unset _BASH_COMPLETIONS_DIR has_completion delegate_completion
 
 if [ -d "$HOME/lib/config" ]; then
-    complete -W "`cd \"$HOME/lib/config\" && echo *`" include
+    complete \
+        -W "`cd \"$HOME/lib/config\" && find . -type f -printf '%P\n'`" \
+        include
 fi
 complete -W "`echo $BROWSER | sed 's/:/ /g'`" start-browser