From 86e59adbac6783c9c5af386aeb1f48b9ef1575cb Mon Sep 17 00:00:00 2001 From: Urban Müller Date: Tue, 27 Sep 2016 17:42:59 +0200 Subject: require : after default so "default" can be default --- it.class | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'it.class') diff --git a/it.class b/it.class index f63c3e0..7e32c4b 100644 --- a/it.class +++ b/it.class @@ -771,7 +771,7 @@ static function getopt($usage, $p = array()) if (($default = it::match('\[(.*)\]\s*$', $usageline)) !== null) { if ($longoptarg || $shortoptarg) - $defaults[$longoptname ? $longoptname : $shortoptname] = it::replace(array('^default:?\s*' => ""), trim($default)); + $defaults[$longoptname ? $longoptname : $shortoptname] = it::replace(array('^default:\s*' => ""), trim($default)); else if (($longoptname || $shortoptname) && it::match('^\w+$', $default)) it::error('defaults for boolean arguments not supported!'); } -- cgit v1.2.3