You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The help command (aliases man, ?) could work much more effectively with scripts. At the moment, it doesn't know anything about script documentation beyond the leading comment. Using the more recent in-script documentation would be a substantial improvement.
+ if is lua script and "[==== and "]====]" are tokens:
+ return text between tokens
+ if ruby script and "=begin" and "end" are tokens:
+ return text between tokens
if find_initial_comment():
return comment
return "No help found"
It's a pretty simplistic text-extraction trick, but that's how the HTML gets built and it all seems to work there! Simply work out which of the two token sets should be used, and print the text between them if the tokens are present.
Activity
lethosor commentedon Jun 15, 2016
Yeah, I've been meaning to do this for a while.
Improve handling of in-script documentation
Improve handling of in-script documentation
myk002 commentedon Dec 6, 2022
this has been implemented for a good while now. closing