From 743523eb8e882a5f7452f94a6f49340a948b1105 Mon Sep 17 00:00:00 2001 From: Tom Ryder Date: Sun, 2 Dec 2018 21:51:17 +1300 Subject: Add some comments to keep() completion --- bash/bash_completion.d/keep.bash | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'bash') 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 ;; -- cgit v1.2.3