aboutsummaryrefslogtreecommitdiff
path: root/bash/bash_completion.d/eds.bash
diff options
context:
space:
mode:
authorTom Ryder <tom@sanctum.geek.nz>2018-12-01 02:29:42 +1300
committerTom Ryder <tom@sanctum.geek.nz>2018-12-01 02:29:42 +1300
commit0681de59778f82c9006de70ed9a9ee6644fd4a18 (patch)
tree1bba07ac51710494c17920f553dea26a69df55d0 /bash/bash_completion.d/eds.bash
parentRemove unneeded quoting in case statement (diff)
downloaddotfiles-0681de59778f82c9006de70ed9a9ee6644fd4a18.tar.gz
dotfiles-0681de59778f82c9006de70ed9a9ee6644fd4a18.zip
Adjust loop short circuits and pattern matches
Diffstat (limited to 'bash/bash_completion.d/eds.bash')
-rw-r--r--bash/bash_completion.d/eds.bash4
1 files changed, 3 insertions, 1 deletions
diff --git a/bash/bash_completion.d/eds.bash b/bash/bash_completion.d/eds.bash
index 0b5e34ea..1c5b2aa2 100644
--- a/bash/bash_completion.d/eds.bash
+++ b/bash/bash_completion.d/eds.bash
@@ -25,7 +25,9 @@ _eds() {
files=("${EDSPATH:-"$HOME"/.local/bin}"/"${COMP_WORDS[COMP_CWORD]}"*)
declare -a executables
for file in "${files[@]}" ; do
- [[ -f $file && -x $file ]] || continue
+ ! [[ -d $file ]] || continue
+ [[ -e $file ]] || continue
+ [[ -x $file ]] || continue
executables[${#executables[@]}]=${file##*/}
done