source code:
#!/bin/bash
complete -W 'word1 word2 word3 aa bb' ./test.bash
echo "the param is: $1"
When I run ./test.bash , turns out the file list of current dir.
complete command doesn't work in zsh??
source code:
#!/bin/bash
complete -W 'word1 word2 word3 aa bb' ./test.bash
echo "the param is: $1"
When I run ./test.bash , turns out the file list of current dir.
complete command doesn't work in zsh??
Bash and Zsh are two different shells though they share quite a lot of common syntax. But you simply cannot expect all Bash things to work in Zsh.