add history session id to $nu (#6585)

* add history session id to $nu

* get nushell to compile

* update test
This commit is contained in:
Darren Schroeder
2022-09-19 09:28:36 -05:00
committed by GitHub
parent d704b05b7a
commit 0b9dd87ca8
8 changed files with 39 additions and 15 deletions

View File

@ -469,12 +469,13 @@ fn variables_completions() {
// Test completions for $nu
let suggestions = completer.complete("$nu.", 4);
assert_eq!(9, suggestions.len());
assert_eq!(10, suggestions.len());
let expected: Vec<String> = vec![
"config-path".into(),
"env-path".into(),
"history-path".into(),
"history-session-id".into(),
"home-path".into(),
"loginshell-path".into(),
"os-info".into(),
@ -489,9 +490,13 @@ fn variables_completions() {
// Test completions for $nu.h (filter)
let suggestions = completer.complete("$nu.h", 5);
assert_eq!(2, suggestions.len());
assert_eq!(3, suggestions.len());
let expected: Vec<String> = vec!["history-path".into(), "home-path".into()];
let expected: Vec<String> = vec![
"history-path".into(),
"history-session-id".into(),
"home-path".into(),
];
// Match results
match_suggestions(expected, suggestions);