We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 0667b8a commit 93ca93dCopy full SHA for 93ca93d
1 file changed
argsparse-completion.sh
@@ -74,7 +74,11 @@ __argsparse_complete() {
74
longs=( "${!__argsparse_options_descriptions[@]}" )
75
longs=( "${longs[@]/#/--}" )
76
option=${prev#--}
77
- if __argsparse_index_of "$prev" "${longs[@]}" >/dev/null && \
+ if __argsparse_index_of -- "${words[@]:0:${#words[@]}-1}" >/dev/null
78
+ then
79
+ # Complete positionnal arguments
80
+ __argsparse_compgen -A file
81
+ elif __argsparse_index_of "$prev" "${longs[@]}" >/dev/null && \
82
argsparse_has_option_property "$option" value
83
then
84
__argsparse_complete_value "$option"
0 commit comments