From 26e8cc3ccc9cd502e6fd898b5b6717938550610f Mon Sep 17 00:00:00 2001 From: Marty Oehme Date: Fri, 14 Nov 2025 14:02:03 +0100 Subject: [PATCH] nu: Add job control shortcuts Using when a process is running backgrounds it (default behavior) using the new nushell job control system (since v0.103). This change also lets you re-foreground the backgrounded program with the same key mapping. Additionally we add the `fg` alias which does the same and thus mimics the fg command of other shells like zsh. --- terminal/.config/nushell/config.nu | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/terminal/.config/nushell/config.nu b/terminal/.config/nushell/config.nu index 2f3484e..09c26e8 100644 --- a/terminal/.config/nushell/config.nu +++ b/terminal/.config/nushell/config.nu @@ -119,6 +119,17 @@ $env.config.keybindings = [ " } } + # job control + { + name: unfreeze_job + modifier: control + keycode: char_z + mode: ["emacs", "vi_normal", "vi_insert"] + event: { + send: executehostcommand + cmd: "job unfreeze" + } + } ] alias l = ls @@ -131,3 +142,6 @@ def --env mcd [path: path] { } alias v = nvim + +# requires minimum nushell: 0.103 for job control +alias fg = job unfreeze