nk412 / optparse

Simple command line arguments parser for BASH

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Not recognizes "--" to stop parsing

K-Ko opened this issue · comments

The -- stopper is not recognized to stop parsing arguments

Test:

#!/bin/bash
. optparse.bash
optparse.define short=t long=test desc='Test run' variable=TEST value=1 default=0
source $( optparse.build )
echo "$@"

Result:

# ./t.sh -t -- arg1 arg2
Unrecognized long option: --
usage: ./t.sh [OPTIONS]
...