From 3c07a58b70b4a4e93f0ee34f6c3b122c561f4b84 Mon Sep 17 00:00:00 2001 From: Tom Willemse Date: Fri, 2 Jan 2026 06:54:19 -0800 Subject: zsh: Add some keybindings --- oni/home/config/common.scm | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/oni/home/config/common.scm b/oni/home/config/common.scm index af3dd44..1b0c7d2 100644 --- a/oni/home/config/common.scm +++ b/oni/home/config/common.scm @@ -276,7 +276,13 @@ LocalForward 19999 localhost:19999")) "PROMPT=\"%T \\$(spwd) %B%(?.%F{2}.%F{1}[%?])>%b%f \"" ;; Prevent aliases from being expanded before looking up ;; completions. - "setopt completealiases\n") + "setopt completealiases\n" + ;; Enable magic-space so shortcuts like !! are expanded. + "bindkey ' ' magic-space\n" + ;; Add shortcut to add sudo to previous command. + "bindkey -s '^[!' '\\exup-history\\n\\C-asudo \\C-e'\n" + ;; Add shortcut to add less to previous command. + "bindkey -s '^[l' '\\exup-history\\n | less'\n") (local-file "zsh/guix-environment.zsh"))))) ;; This has to be the first extension because it needs to be added to the ;; configuration last. -- cgit v1.3-2-g0d8e