mirror of
https://github.com/nushell/nushell.git
synced 2025-01-11 16:58:41 +01:00
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()?;
|
||||
|
||||
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);
|
||||
|
||||
if let Some(span) = block.span {
|
||||
|
Loading…
Reference in New Issue
Block a user