Zsh Mailing List Archive
Messages sorted by: Reverse Date, Date, Thread, Author

read timeout argument || completion of a function



Hi all,

i'm very surprised to observe there isn't timeout argument for read
builtin function. I've looked for this problem in mailing list
archives and just found one mail who say to use expect. Don't sure
it's the solution for just ask yes/no (with -q argument)

Do you think add this features ? Maybe i can try to look for myself in
the source, but i'm afraid it's too difficult for me.

Moreover, i'm looking the way for provide completion for a function :

for example :

myping () {
       ping $1
}

First of all, i want to be sure i _can't_ define the default
completion tag with zstyle for a command which don't have
_command completion function (default tag called is _files isn't it
?). 

I have also try to write a just little function _myping which contains 

#compdef myping

_arguments '*:hostname:_hosts'

but myping <tab> provide file completion, and _myping <tab> hosts
completion.

Thank you very much.

-- 
Bruno Bonfils



Messages sorted by: Reverse Date, Date, Thread, Author