Category:Guish: Difference between revisions

Content added Content deleted
No edit summary
No edit summary
Line 325: Line 325:
; '''=> <signal> <subcmd>'''
; '''=> <signal> <subcmd>'''
: register a sub-command <subcmd> to run when <signal> triggers. For normal signals (eg. signals tied to elements), there must exist an implied subject.
: register a sub-command <subcmd> to run when <signal> triggers. For normal signals (eg. signals tied to elements), there must exist an implied subject.
; '''global <var> = <val>'''
; '''global <var> = [<val>]'''
: defines a variable using the same rules of variable definition, but defining that variable in the global scope; this usually can be used inside functions to define a global variable which doesn't exist already.
: defines a variable using the same rules of variable definition, but defining that variable in the global scope; this usually can be used inside functions to define a global variable which doesn't exist already.
; '''q'''
; '''q'''
Line 335: Line 335:
; '''run <cmd>'''
; '''run <cmd>'''
: execute shell command <cmd>.
: execute shell command <cmd>.
; '''dump <args>'''
; '''puts [<...>]'''
: print <args> to stdout with a newline added.
: prints remaining phrase to stdout with a newline added.
; '''puts <arg>'''
; '''p [<...>]'''
: print <arg> to stdout with a newline added.
: prints remaining phrase to stdout.
; '''p <arg>'''
; '''e [<...>]'''
: print <arg> to stdout.
: prints remaining phrase to stderr.
; '''e <arg>'''
; '''unset <name|num|wid> [<attr>]'''
: unsets a variable (<name>) or timed scheduled procedure registered with <num>, see '''every''' command. If, instead of <name|num>, an element id <wid> is given and a name attribute <attr> is given, deletes that element attribute.
: print <arg> to stderr.
; '''unset <namescheduled num>'''
: unset variable or timed scheduled procedure registered with <num>, see '''every''' command.
; '''source <file>'''
; '''source <file>'''
: execute commands from file.
: execute commands from file.
; '''vars'''
; '''vars [<wid>]'''
: shows all variables present in the current scope or, if <wid> element id is given, shows all element attributes (uses stderr).
: display all variables on standard error.
; '''ls'''
; '''ls'''
: display all existing widgets on standard error.
: display all existing widgets (stderr).
; '''del <wid>'''
; '''del <wid>'''
: delete a widget with id <wid>.
: delete a widget with id <wid>.
Line 636: Line 634:


<pre> |b||b||b|+
<pre> |b||b||b|+
dump *</pre>
puts *</pre>
== Variable substitution ==
== Variable substitution ==