1#compdef dpatch-edit-patch
2
3_arguments \
4  '(-d --description)'{-d,--description=}'[description for the new patch, if applicable]' \
5  '(-o --outdir)'{-o,--outdir=}'[output directory for patches]:patch output directory:_files -/' \
6  '(-s --sourcedir)'{-s,--sourcedir=}'[source directory]:source directory:_files -/' \
7  '(-t --tmpdir)'{-t,--tmpdir=}'[temporary directory]:temporary directory:_files -/' \
8  '(-p --stampdir)'{-p,--stampdir=}'[stamp directory]:stamp directory:_files -/' \
9  '(-e --exclude)'{-e,--exclude}'[list of files and directories to be excluded]:excluded files and directories:_files' \
10  '(-b --debianonly)'{-b,--debianonly=}'[unpack .orig.tar.gz before invoking the shell]:path to .orig.tar.gz:_files' \
11  '(-k --keeptemp)'{-k,--keeptemp}'[keep working source tree after exit]' \
12  '(-c --clean)'{-c,--clean}'[clean the current directory]' \
13  '(-l --shell)'{-l,--shell=}'[shell to be invoked]:shell:' \
14  '(-P --origtargzpath)'{-P,--origtargzpath=}'[colon-separated list of paths containing upstream tarballs, use with -b]:path to upstream tarballs:_dir_list' \
15  '(-h --help)'{-h,--help}'[help text]' \
16  '1:patch name:_files -W $PWD/debian/patches -g \*.dpatch\(-.\:r\)' \
17  '2:base patch name:_files -W $PWD/debian/patches -g \*.dpatch\(-.\:r\)'
18