mirror of
https://github.com/nushell/nushell.git
synced 2025-07-08 02:17:22 +02:00
Remove old alias implementation (#8797)
This commit is contained in:
@ -1,4 +1,3 @@
|
||||
use itertools::Itertools;
|
||||
use nu_engine::CallExt;
|
||||
use nu_protocol::ast::Call;
|
||||
use nu_protocol::engine::{Command, EngineState, Stack};
|
||||
@ -133,15 +132,6 @@ impl Command for ViewSource {
|
||||
Vec::new(),
|
||||
))
|
||||
}
|
||||
} else if let Some(alias_id) = engine_state.find_alias(val.as_bytes(), &[]) {
|
||||
let contents = &mut engine_state.get_alias(alias_id).iter().map(|span| {
|
||||
String::from_utf8_lossy(engine_state.get_span_contents(span)).to_string()
|
||||
});
|
||||
Ok(Value::String {
|
||||
val: contents.join(" "),
|
||||
span: call.head,
|
||||
}
|
||||
.into_pipeline_data())
|
||||
} else {
|
||||
Err(ShellError::GenericError(
|
||||
"Cannot view value".to_string(),
|
||||
|
Reference in New Issue
Block a user