summaryrefslogtreecommitdiff
path: root/bash
diff options
context:
space:
mode:
authorAnton Khirnov <anton@khirnov.net>2021-03-27 14:55:38 +0100
committerAnton Khirnov <anton@khirnov.net>2021-03-27 14:55:38 +0100
commitca92b4e34be84abf75b2c9366ba2a679ea0eac51 (patch)
tree6241f35cf012cbae92162ba294a9e5bae6149246 /bash
parent816cbc1a87593a93fe5eaea706ed1e3bfddb959d (diff)
bash: add script for loading custom completions
Diffstat (limited to 'bash')
-rw-r--r--bash/bash_completion7
1 files changed, 7 insertions, 0 deletions
diff --git a/bash/bash_completion b/bash/bash_completion
new file mode 100644
index 0000000..9fd9617
--- /dev/null
+++ b/bash/bash_completion
@@ -0,0 +1,7 @@
+COMPLETION_DIR=~/.bash_completion.d/
+
+if [[ -d $COMPLETION_DIR && -r $COMPLETION_DIR && -x $COMPLETION_DIR ]]; then
+ for i in $(LC_ALL=C command ls "$COMPLETION_DIR"); do
+ . "$COMPLETION_DIR/$i"
+ done
+fi