-
-
Notifications
You must be signed in to change notification settings - Fork 564
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Nushell error, cannot find column 'keybindings' #1189
Comments
Is that perhaps an issue with the latest version? I have just installed atuin, and I'm having the exact same issue. |
I've just upgraded to the last release of nushell 0.84.0 which comes with a breaking change related to str, so the issue error is still here but now, I got a new one : Error: × Deprecated option
╭─[/Users/fabien/Library/Application Support/nushell/env.nu:15:1]
15 │ let dir = ([
16 │ ($env.PWD | str substring 0..($home | str length) | str replace --string $home "~"),
· ─────┬─────
· ╰── `str replace --string` is deprecated and will be removed in 0.85.
17 │ ($env.PWD | str substring ($home | str length)..)
╰────
help: Substring matching is now the default. Use `--regex` or `--multiline` for matching regular expressions.
Error: × Deprecated option
╭─[/Users/fabien/Library/Application Support/nushell/env.nu:23:1]
23 │
24 │ $path_segment | str replace --all --string (char path_sep) $"($separator_color)/($path_color)"
· ─────┬─────
· ╰── `str replace --string` is deprecated and will be removed in 0.85.
25 │ }
╰────
help: Substring matching is now the default. Use `--regex` or `--multiline` for matching regular expressions. From the changelog, the second error seems easy to fix :
|
I got the same issue. |
In init.nu, delete the following stanzas for the keybindings
In your config.nu, add the following to the keybindings:
The one piece that works but I'm not sure why it's erroring out on current versions of Nu, is that I had to source the init.nu file at the beginning of config.nu and the end of config.nu - otherwise, it didn't work. The downside of that is that the random token generation doesn't work, so I had to statically define a token in init.nu like so:
|
@fabienengels change your nu config file to
to make it work. I presume there is no default for keybindings and the atuin nushell integration assumes there to be at least an empty list |
Correct, and maybe a recent change; not sure. The fix is to set one, the same way is done for hooks, in init.nu $env.config = ($env.config | default [] keybindings) |
This file is generated; there are two possible patches to fix this. One is to append this line to the template: diff --git a/atuin/src/shell/atuin.nu b/atuin/src/shell/atuin.nu
index 33ce0068..673e99d0 100644
--- a/atuin/src/shell/atuin.nu
+++ b/atuin/src/shell/atuin.nu
@@ -46,3 +46,5 @@ $env.config = (
$env.config.hooks | get -i pre_prompt | default [] | append $_atuin_pre_prompt)
)
)
+
+$env.config = ($env.config | default [] keybindings) in which case it will be there every time, even if no keybindings are set. The other handles this condition: diff --git a/atuin/src/command/init.rs b/atuin/src/command/init.rs
index 880fcf86..ac41e7e4 100644
--- a/atuin/src/command/init.rs
+++ b/atuin/src/command/init.rs
@@ -98,6 +98,8 @@ bind -M insert \e\[A _atuin_bind_up";
println!("{full}");
if std::env::var("ATUIN_NOBIND").is_err() {
+ const BINDS_MAYBE_EMPTY: &str = r#"$env.config = ($env.config | default [] keybindings)
+"#;
const BIND_CTRL_R: &str = r#"$env.config = (
$env.config | upsert keybindings (
$env.config.keybindings
@@ -124,6 +126,7 @@ bind -M insert \e\[A _atuin_bind_up";
)
)
"#;
+ println!("{BINDS_MAYBE_EMPTY}");
if !self.disable_ctrl_r {
println!("{BIND_CTRL_R}");
} LMK which you prefer as a PR |
@dcarosone I'd love to accept a PR for your first suggestion please! Nushell has had breaking changes pretty regularly lately (understandable, it's fresh and moving fast). So it's easiest we patch things there |
fixes #1189 Co-authored-by: Daniel Carosone <[email protected]>
Hi,
I got an error when using atuin 16.0.0 with nushell 0.83.1 :
I generate atuin source using the following command :
And here, my nushell config file :
Putting the source line first, change anything.
Thank you in advance for your help
The text was updated successfully, but these errors were encountered: