aboutsummaryrefslogtreecommitdiff
path: root/bash
diff options
context:
space:
mode:
authorTom Ryder <tom@sanctum.geek.nz>2018-12-02 21:51:17 +1300
committerTom Ryder <tom@sanctum.geek.nz>2018-12-02 21:51:17 +1300
commit743523eb8e882a5f7452f94a6f49340a948b1105 (patch)
treeb2991b3f6d9760dd25a69e0bc92299d5a543dd42 /bash
parent62cf36d3521c282c957f8667e702886472e95a0f (diff)
downloaddotfiles-743523eb8e882a5f7452f94a6f49340a948b1105.tar.gz
dotfiles-743523eb8e882a5f7452f94a6f49340a948b1105.zip
Add some comments to keep() completion
Diffstat (limited to 'bash')
-rw-r--r--bash/bash_completion.d/keep.bash4
1 files changed, 4 insertions, 0 deletions
diff --git a/bash/bash_completion.d/keep.bash b/bash/bash_completion.d/keep.bash
index c7144684..4b479eca 100644
--- a/bash/bash_completion.d/keep.bash
+++ b/bash/bash_completion.d/keep.bash
@@ -46,9 +46,13 @@ _keep() {
# Build list of kept names
bashkeep=${BASHKEEP:-"$HOME"/.bashkeep.d}
for keep in "$bashkeep"/"$2"*.bash ; do
+ # Skip directories
! [[ -d $keep ]] || continue
+ # Strip leading path
keep=${keep##*/}
+ # Strip trailing extension
keep=${keep%.bash}
+ # Print kept name
printf '%s\n' "$keep"
done
;;