mirror of
https://github.com/nushell/nushell.git
synced 2024-11-23 17:03:45 +01:00
653 B
653 B
title | layout | version |
---|---|---|
view-source | command | 0.59.1 |
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
View the source of a custom command
> def hi [] { echo 'Hi!' }; view-source hi
View the source of a custom command, which participates in the caller environment
> def-env foo [] { let-env BAR = 'BAZ' }; view-source foo
View the source of a module
> module mod-foo { export env FOO_ENV { 'BAZ' } }; view-source mod-foo