My programm can have the following format:
<command_name> <arguments> <options> -hosts <host1> <host2> ... <hostn> (<more_arguments>) ...
I am trying to set bash auto-completion, and based on debian-administration's article, I have done host completion like this :
(...) case "${prev}" in -hosts) _known_hosts_real -a "$cur" return 0 ;; (...) (...) Of course after writing -hosts bash is able to complete the name of a single host, but not multiple hosts. Is there a beautiful way to achieve this hack without completing hosts when we deal with other arguments than -hosts?
zshtagged?