21 lines
383 B
Plaintext
21 lines
383 B
Plaintext
#compdef sendirc
|
|
|
|
function _sendirc {
|
|
|
|
function _sendircserv {
|
|
local -a servs=(~/IRC/*/global/in(p))
|
|
servs=(${${servs%%\/global\/in}##*/})
|
|
compadd -a servs
|
|
}
|
|
function _sendircbuf {
|
|
local -a chans=(~/IRC/${words[2]}/{channel,user}/*(/))
|
|
chans=(${chans##*/})
|
|
compadd -a chans
|
|
}
|
|
|
|
_arguments -C -s \
|
|
':server:_sendircserv' \
|
|
':buffer:_sendircbuf' \
|
|
'*::message'
|
|
}
|