···4242 local requestComp out directive
43434444 # Build the command to get completions
4545- requestComp="${exec} complete -- \${words[@]:1}"
4545+ # Use a more compatible approach instead of \${words[@]:1}
4646+ local args=""
4747+ for (( i=1; i<cword+1; i++ )); do
4848+ if [[ -n "\${words[i]}" ]]; then
4949+ args="$args \\"\${words[i]}\\""
5050+ fi
5151+ done
5252+ requestComp="${exec} complete --$args"
46534754 # Add an empty parameter if the last parameter is complete
4855 if [[ -z "$cur" ]]; then