view source
for debug
View a block, module, or a definition.
Signature
> view source (item)
Parameters
item
: name or block to view
Examples
View the source of a code block
> let abc = { echo 'hi' }; view source $abc
{ echo 'hi' }
View the source of a custom command
> def hi [] { echo 'Hi!' }; view source hi
{ echo 'Hi!' }
View the source of a custom command, which participates in the caller environment
> def-env foo [] { let-env BAR = 'BAZ' }; view source foo
{ let-env BAR = 'BAZ' }
View the source of a module
> module mod-foo { export-env { let-env FOO_ENV = 'BAZ' } }; view source mod-foo
export-env { let-env FOO_ENV = 'BAZ' }
View the source of an alias
> alias hello = echo hi; view source hello
echo hi