【发布时间】:2017-11-22 07:52:35
【问题描述】:
源代码:
#!/bin/bash
complete -W 'word1 word2 word3 aa bb' ./test.bash
echo "the param is: $1"
当我运行 ./test.bash 时,会显示当前目录的文件列表。
完整的命令在 zsh 中不起作用??
【问题讨论】:
标签: bash zsh tab-completion bash-completion
源代码:
#!/bin/bash
complete -W 'word1 word2 word3 aa bb' ./test.bash
echo "the param is: $1"
当我运行 ./test.bash 时,会显示当前目录的文件列表。
完整的命令在 zsh 中不起作用??
【问题讨论】:
标签: bash zsh tab-completion bash-completion
Bash 和 Zsh 是两个不同的 shell,尽管它们有很多共同的语法。但是你不能指望所有的 Bash 东西都能在 Zsh 中工作。
【讨论】:
zsh 有补全设施,但它们与bash 有很大不同。请参阅man zshcompwid、man zshcompsys 和 man zshcompctl。