submit-patches.zsh: Greatly improve the script
Take a command line option for who to send to, rather than relying on having the proper variable set or commented out. Also, add some tab completion. Signed-off-by: Anna Schumaker <Anna.Schumaker@Netapp.com>
This commit is contained in:
parent
5e1664d88a
commit
0fed27b109
|
@ -0,0 +1,9 @@
|
|||
#compdef submit-patches.zsh
|
||||
|
||||
function _submit-patches.zsh() {
|
||||
_arguments \
|
||||
--nfs'[submit to nfs maintainers]' \
|
||||
--nfsd'[submit to nfsd maintainers]' \
|
||||
--nfsutils'[submit to nfs-utils maintainers]' \
|
||||
{--xfstests,--fstests}'[submit to xfstests maintainers]'
|
||||
}
|
|
@ -1,13 +0,0 @@
|
|||
#!/bin/bash
|
||||
|
||||
FROM="--from=Anna.Schumaker@Netapp.com"
|
||||
TO="--to=Trond.Myklebust@hammerspace.com"
|
||||
#TO="--to=bfields@redhat.com --to=chuck.lever@oracle.com"
|
||||
#TO="--to=fstests@vger.kernel.org"
|
||||
#TO="--to=steved@redhat.com"
|
||||
|
||||
TO="$TO --to=linux-nfs@vger.kernel.org"
|
||||
|
||||
CC="--cc=Anna.Schumaker@Netapp.com"
|
||||
|
||||
git send-email $FROM $TO $CC $*
|
|
@ -0,0 +1,25 @@
|
|||
#!/bin/zsh
|
||||
|
||||
zparseopts -D -K \
|
||||
-nfs+=WHO -nfsd+=WHO -nfsutils+=WHO -xfstests+=WHO -fstests+=WHO
|
||||
|
||||
if [[ ${#WHO} -eq 0 ]]; then
|
||||
echo "Who to submit to?"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
TO=(--to=linux-nfs@vger.kernel.org)
|
||||
for who in $WHO; do
|
||||
case $who in
|
||||
--nfs) TO+=(--to=trond.myklebust@hammerspace.com) ;;
|
||||
--nfsd) TO+=(--to=chuck.lever@oracle.com) ;;
|
||||
--nfsutils) TO+=(--to=steved@redhat.com) ;;
|
||||
--xfstests | --fstests) TO+=(--to=fstests@vger.kernel.org) ;;
|
||||
esac
|
||||
done
|
||||
|
||||
TO+=(--cc=anna@kernel.org)
|
||||
TO+=(--from=Anna.Schumaker@Netapp.com)
|
||||
TO=$(echo ${(u)TO})
|
||||
|
||||
git send-email $TO $*
|
Loading…
Reference in New Issue