command completion limit options to those valid with system getopt

This commit is contained in:
James Tomasino 2018-03-06 10:14:41 -05:00
parent 4c60852713
commit 085d5b43bc
1 changed files with 7 additions and 2 deletions

9
burrow
View File

@ -386,8 +386,13 @@ function main {
parse_input "$@"
if [[ $arg_shortlist -gt 0 ]]; then
die "phlog topic recipe create-config update-git -v -h -d --version \
--help --debug --noautoindent" 0
out="phlog topic recipe create-config update-git -v -h -d"
# include long options only if using gnu getopt
getopt -T > /dev/null
if [ $? -eq 4 ]; then
out="${out} --version --help --debug --noautointent"
fi
die "${out}" 0
fi
if [[ $flag_version -gt 0 ]]; then