#compdef dotnet _dotnet() { local completions=("$(dotnet complete "$words")") # If the completion list is empty, just continue with filename selection if [ -z "$completions" ] then _arguments '*::arguments: _normal' return fi # This is not a variable assigment, don't remove spaces! _values = "${(ps:\n:)completions}" }