diff options
author | Tom Ryder <tom@sanctum.geek.nz> | 2018-12-02 21:51:17 +1300 |
---|---|---|
committer | Tom Ryder <tom@sanctum.geek.nz> | 2018-12-02 21:51:17 +1300 |
commit | 743523eb8e882a5f7452f94a6f49340a948b1105 (patch) | |
tree | b2991b3f6d9760dd25a69e0bc92299d5a543dd42 /bash/bash_completion.d | |
parent | Correct find(1) completion to subshell exit (diff) | |
download | dotfiles-743523eb8e882a5f7452f94a6f49340a948b1105.tar.gz dotfiles-743523eb8e882a5f7452f94a6f49340a948b1105.zip |
Add some comments to keep() completion
Diffstat (limited to 'bash/bash_completion.d')
-rw-r--r-- | bash/bash_completion.d/keep.bash | 4 |
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 ;; |