diff --git a/fhem/FHEM/98_help.pm b/fhem/FHEM/98_help.pm index 074b129f1..59cceac5e 100644 --- a/fhem/FHEM/98_help.pm +++ b/fhem/FHEM/98_help.pm @@ -117,10 +117,10 @@ sub CommandHelp { cref_search_cmd(undef); - my $str = "
Possible commands:"; + return $str; + +# my $str = "
" . - "Command Parameter
" . - " Description
" . - "----------------------------------------------------------------------
"; + my $str = "Possible commands:\n\n" . + "Command Parameter\n" . + " Description\n" . + "----------------------------------------------------------------------\n"; for my $cmd (sort keys %cmds) { next if(!$cmds{$cmd}{Hlp}); @@ -133,10 +133,31 @@ sub CommandHelp { $a[1] = " $a[1]"; $a[1] =~ s/</g; $a[1] =~ s/>/>/g; - $str .= sprintf("%-15s%-50s
%s
", $cmd, $a[0], $a[1]); + $str .= sprintf("%-15s%-50s\n%s\n", $cmd, $a[0], $a[1]); } - return "$str
Possible commands:"; } }
" . +# "Command Parameter
" . +# " Description
" . +# "----------------------------------------------------------------------
"; +# +# for my $cmd (sort keys %cmds) { +# next if(!$cmds{$cmd}{Hlp}); +# next if($cl && $cmds{$cmd}{ClientFilter} && +# $cl->{TYPE} !~ m/$cmds{$cmd}{ClientFilter}/); +# my @a = split(",", $cmds{$cmd}{Hlp}, 2); +# $a[0] =~ s/</g; +# $a[0] =~ s/>/>/g; +# $a[1] //= ""; +# $a[1] = " $a[1]"; +# $a[1] =~ s/</g; +# $a[1] =~ s/>/>/g; +# $str .= sprintf("%-15s%-50s
%s
", $cmd, $a[0], $a[1]); +# } +# +# return "$str