forked from extern/nushell
add ability to view-source on closures (#7935)
closes https://github.com/nushell/nushell/issues/7934
This commit is contained in:
parent
5e957ecda6
commit
d13ce2aec9
@ -37,7 +37,7 @@ impl Command for ViewSource {
|
|||||||
let arg_span = arg.span()?;
|
let arg_span = arg.span()?;
|
||||||
|
|
||||||
match arg {
|
match arg {
|
||||||
Value::Block { val: block_id, .. } => {
|
Value::Block { val: block_id, .. } | Value::Closure { val: block_id, .. } => {
|
||||||
let block = engine_state.get_block(block_id);
|
let block = engine_state.get_block(block_id);
|
||||||
|
|
||||||
if let Some(span) = block.span {
|
if let Some(span) = block.span {
|
||||||
|
Loading…
Reference in New Issue
Block a user