dotfiles/bash_completion.d/post-review
Dan Buch a8cd5a2fe9 Attempting to carve out a sensible chunk of stuff for a dotfiles repo.
Sure hope I didn't miss any super secret crap :-P
2012-02-26 14:38:01 -05:00

14 lines
398 B
Bash

function __post_review_opts(){
post-review --help | grep -E "^ *-" | \
awk '/^ *--/ { gsub(/=.*/, "") ; print $1 }
/^ *-[^-]/ {
gsub(/=.*/, "") ;
gsub(/,/, "") ;
print $1 "\n" $2
}' | grep -v ID
}
which post-review >/dev/null 2>&1 && complete -W "$(__post_review_opts)" -o default post-review
# vim:filetype=sh