mirror of
https://github.com/nushell/nushell.git
synced 2025-08-09 12:35:59 +02:00
nu-cli: directory syntax shape + completions (#5299)
This commit is contained in:
@ -530,6 +530,15 @@ pub fn eval_expression(
|
||||
span: expr.span,
|
||||
})
|
||||
}
|
||||
Expr::Directory(s) => {
|
||||
let cwd = current_dir_str(engine_state, stack)?;
|
||||
let path = expand_path_with(s, cwd);
|
||||
|
||||
Ok(Value::String {
|
||||
val: path.to_string_lossy().to_string(),
|
||||
span: expr.span,
|
||||
})
|
||||
}
|
||||
Expr::GlobPattern(s) => {
|
||||
let cwd = current_dir_str(engine_state, stack)?;
|
||||
let path = expand_path_with(s, cwd);
|
||||
|
Reference in New Issue
Block a user