summaryrefslogtreecommitdiff
path: root/it.class
diff options
context:
space:
mode:
authorNathan Gass2013-07-17 11:32:00 +0000
committerNathan Gass2013-07-17 11:32:00 +0000
commita53af0c94f8f1b6c00f5f5f3fc183a58aab6affe (patch)
treee342cff98982814220b7c375dd658acf75972e0c /it.class
parent48251be9125f8e23df180126d50422b0e6561030 (diff)
downloaditools-a53af0c94f8f1b6c00f5f5f3fc183a58aab6affe.tar.gz
itools-a53af0c94f8f1b6c00f5f5f3fc183a58aab6affe.tar.bz2
itools-a53af0c94f8f1b6c00f5f5f3fc183a58aab6affe.zip
revert special --opts syntax as -opts does not warn on missing dashes anyway
Diffstat (limited to 'it.class')
-rw-r--r--it.class6
1 files changed, 3 insertions, 3 deletions
diff --git a/it.class b/it.class
index 0c6d4a6..18f9ffc 100644
--- a/it.class
+++ b/it.class
@@ -550,16 +550,16 @@ static function shell_command(/* $cmd, $values1 = array(), ... */)
#for escapeshellarg in it::_exec_quotevalue
$oldlocale = setlocale(LC_CTYPE, 0);
setlocale(LC_CTYPE, 'de_CH');
- foreach (it::match('({(-?-?)([a-z0-9]\w*)})', $cmd, array('all' => true)) as $tags)
+ foreach (it::match('({(-?)([a-z0-9]\w*)})', $cmd, array('all' => true)) as $tags)
{
list($tag, $option, $key) = $tags;
$parts = array();
if ($option)
{
- foreach ((array)$values[$option . $key] as $key => $value)
+ foreach ((array)$values["-$key"] as $key => $value)
{
- if ($option == '--')
+ if ($key[0] != '-')
$key = ($key[1] ? '--' : '-') . $key;
if ($value === true || $value === false || $value === null)
$parts[] = $value ? $key : "";