#compdef etc_chkln.pl
### vim:ft=zsh:foldmethod=marker
###
### Frank Terbeck <ft@bewatermyfriend.org>
### Last-Modified: Wed Dec 26 14:36:35 2007
###
### URI: <http://ft.bewatermyfriend.org/comp/zsh.html>
###

_etc_subdirs() {
    local expl
    _wanted list expl subdir compadd $expl - ~/etc/*(/:t)
}

_arguments -C \
    '(--help -h)'{--help,-h}'[display help message]:'                                       \
    '(--version -V)'{--version,-V}'[display version information]:'                          \
    '(--verbose -v)'{--verbose,-v}'[when executing, be more verbose]'                       \
    '(--debug -d)'{--debug,-d}'[even more output then --verbose]'                           \
    '(--print -p)'{--print,-p}'[print links in database for package]:subdir:_etc_subdirs'   \
    '(--check -c)'{--check,-c}'[check a programs links]:subdir:_etc_subdirs'                \
    '(--add -a)'{--add,-a}'[add a link]:subdir:_etc_subdirs'                                \
    '(--remove -r)'{--remove,-r}'[remove a link]:subdir:_etc_subdirs'                       \
    '(--fix -f)'{--fix,-f}'[fix a link]:subdir:_etc_subdirs'                                \
    '(--printall -P)'{--printall,-P}'[print complete link database]:'                       \
    '(--checkall -C)'{--checkall,-C}'[check _all_ links]:'                                  \
    '(--addall -A)'{--addall,-A}'[add _all_ links in README]:'                              \
    '(--removeall -R)'{--removeall,-R}'[remove _all_ links in README]:'                     \
    '(--fixall -F)'{--fixall,-F}'[fix _all_ broken links]:'                                 \
    '(--dryrun -D)'{--dryrun,-D}'[only print what would be done.]'                          \
    '(--ignore -i)'{--ignore,-i}'[ignore errors and keep going.]'                           \
    '--force[force potentially dangerous actions]'                                          \