From 119c396efc55a3a16cd52caf90a3f83b11e4dd7e Mon Sep 17 00:00:00 2001 From: "s0wlz (Matthias Puchstein)" Date: Sun, 17 May 2026 17:31:14 +0200 Subject: [PATCH] nu: add Alt+. last-arg keybinding and nushell-book doc submodule MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - keybindings block in config.nu with Alt+. → insert last token from history - nushell.github.io added as external_nushell-book submodule under dot_local/share/docs - CLAUDE.md local docs table updated --- .gitmodules | 3 +++ CLAUDE.md | 1 + dot_config/nushell/config.nu.tmpl | 13 +++++++++++++ dot_local/share/docs/external_nushell-book | 1 + 4 files changed, 18 insertions(+) create mode 160000 dot_local/share/docs/external_nushell-book diff --git a/.gitmodules b/.gitmodules index d1184fa..859b01e 100644 --- a/.gitmodules +++ b/.gitmodules @@ -7,3 +7,6 @@ [submodule "dot_local/share/docs/external_waybar.wiki"] path = dot_local/share/docs/external_waybar.wiki url = https://github.com/Alexays/Waybar.wiki.git +[submodule "dot_local/share/docs/external_nushell-book"] + path = dot_local/share/docs/external_nushell-book + url = https://github.com/nushell/nushell.github.io.git diff --git a/CLAUDE.md b/CLAUDE.md index 4c45cf0..f96dcf1 100644 --- a/CLAUDE.md +++ b/CLAUDE.md @@ -64,6 +64,7 @@ This copies built theme artifacts into the appropriate `dot_config/*/themes/` di | chezmoi | `~/.local/share/docs/chezmoi-docs/` | | Hyprland | `~/.local/share/docs/hyprland.wiki/` | | Waybar | `~/.local/share/docs/waybar.wiki/` (also `man 5 waybar`) | +| Nushell | `~/.local/share/docs/nushell-book/` | | Ghostty | `/usr/share/ghostty` | ## Commit convention diff --git a/dot_config/nushell/config.nu.tmpl b/dot_config/nushell/config.nu.tmpl index 808a3ce..91484f6 100644 --- a/dot_config/nushell/config.nu.tmpl +++ b/dot_config/nushell/config.nu.tmpl @@ -30,6 +30,19 @@ $env.config = { completer: $carapace_completer } } + + keybindings: [ + { + name: insert_last_arg + modifier: alt + keycode: char_. + mode: [vi_insert, emacs] + event: { + send: executehostcommand + cmd: "commandline edit --insert (history | last | split words | last)" + } + } + ] } plugin use gstat diff --git a/dot_local/share/docs/external_nushell-book b/dot_local/share/docs/external_nushell-book new file mode 160000 index 0000000..6e1900f --- /dev/null +++ b/dot_local/share/docs/external_nushell-book @@ -0,0 +1 @@ +Subproject commit 6e1900ffe2281c6c3ee4c7d82a32301074325033