From 626b1b99cd667243f4587d83bdef17d1e907b106 Mon Sep 17 00:00:00 2001 From: Darren Schroeder <343840+fdncred@users.noreply.github.com> Date: Sat, 11 Dec 2021 13:29:56 -0600 Subject: [PATCH] add `keybinding-path` to `$nu` (#470) --- crates/nu-engine/src/eval.rs | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/crates/nu-engine/src/eval.rs b/crates/nu-engine/src/eval.rs index 73f1d801f..000f879f8 100644 --- a/crates/nu-engine/src/eval.rs +++ b/crates/nu-engine/src/eval.rs @@ -491,6 +491,7 @@ pub fn eval_variable( config_path.push("nushell"); let mut history_path = config_path.clone(); + let mut keybinding_path = config_path.clone(); history_path.push("history.txt"); @@ -507,6 +508,15 @@ pub fn eval_variable( val: config_path.to_string_lossy().to_string(), span, }); + + // TODO: keybindings don't exist yet but lets add a file + // path for them to be stored in. It doesn't have to be yml. + keybinding_path.push("keybindings.yml"); + output_cols.push("keybinding-path".into()); + output_vals.push(Value::String { + val: keybinding_path.to_string_lossy().to_string(), + span, + }) } #[cfg(feature = "plugin")]