mirror of
https://github.com/fhem/fhem-mirror.git
synced 2025-04-08 13:24:56 +00:00
set ? fixed
git-svn-id: https://svn.fhem.de/fhem/trunk@615 2b470e98-0d58-463d-a4d8-8e2adae1ed80
This commit is contained in:
parent
4890c09886
commit
e25bc4ba8e
@ -133,7 +133,10 @@ structure_Set($@)
|
|||||||
{
|
{
|
||||||
my ($hash, @list) = @_;
|
my ($hash, @list) = @_;
|
||||||
my $ret = "";
|
my $ret = "";
|
||||||
|
my %pars;
|
||||||
|
|
||||||
$hash->{INSET} = 1;
|
$hash->{INSET} = 1;
|
||||||
|
|
||||||
foreach my $d (sort keys %{ $hash->{CONTENT} }) {
|
foreach my $d (sort keys %{ $hash->{CONTENT} }) {
|
||||||
next if(!$defs{$d});
|
next if(!$defs{$d});
|
||||||
if($defs{$d}{INSET}) {
|
if($defs{$d}{INSET}) {
|
||||||
@ -151,11 +154,17 @@ structure_Set($@)
|
|||||||
if($sret) {
|
if($sret) {
|
||||||
$ret .= "\n" if($ret);
|
$ret .= "\n" if($ret);
|
||||||
$ret .= $sret;
|
$ret .= $sret;
|
||||||
|
if($list[1] eq "?") {
|
||||||
|
$sret =~ s/.*one of //;
|
||||||
|
map { $pars{$_} = 1 } split(" ", $sret);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
delete($hash->{INSET});
|
delete($hash->{INSET});
|
||||||
Log 5, "ATTR: $ret" if($ret);
|
Log 5, "SET: $ret" if($ret);
|
||||||
return undef;
|
return $list[1] eq "?"
|
||||||
|
? "Unknown argument ?, choose one of " . join(" ", sort keys(%pars))
|
||||||
|
: undef;
|
||||||
}
|
}
|
||||||
|
|
||||||
###################################
|
###################################
|
||||||
|
Loading…
x
Reference in New Issue
Block a user