Skip to content

Commit b7396b5

Browse files
committed
fix(minicom): do not generate empty completions
With the current implementation, an empty completion would be generated when there is a file whose basename is `minirc.`. In this patch, we filter such files in the pathname-expansion phase by requiring at least one character after `minirc.` in the filenames.
1 parent 22db6dc commit b7396b5

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

completions/minicom

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ _minicom()
3434
fi
3535

3636
local -a files
37-
_comp_expand_glob files '/etc/minirc.* /etc/minicom/minirc.* ~/.minirc.*'
37+
_comp_expand_glob files '{/etc/,/etc/minicom/,~/.}minirc.?*'
3838
((${#files[@]})) &&
3939
COMPREPLY=($(compgen -W '"${files[@]##*minirc.}"' -- "$cur"))
4040
} &&

0 commit comments

Comments
 (0)