diff --git a/src/lib/builtins/variables.rs b/src/lib/builtins/variables.rs index 43e441a2e7f13f130299e0fa1c917edafa212299..7cdcb1e657ca2d27c531496cd9879054b1d16fe9 100644 --- a/src/lib/builtins/variables.rs +++ b/src/lib/builtins/variables.rs @@ -75,7 +75,11 @@ pub fn builtin_alias(args: &[types::Str], shell: &mut Shell<'_>) -> Status { } Binding::ListEntries => print_list(shell.variables()), Binding::KeyOnly(key) => { - return Status::error(format!("ion: please provide value for alias '{}'", key)); + if let Some(alias) = shell.variables().get(&key) { + println!("alias {}='{}'", key, alias); + } else { + return Status::error(format!("ion: alias '{}' not found", key)); + } } } Status::SUCCESS