From 5cc15933172081f673a075ec3ddba2f9b8570cdb Mon Sep 17 00:00:00 2001 From: jolheiser Date: Thu, 30 Nov 2023 11:26:03 -0600 Subject: [PATCH] feat: fg Signed-off-by: jolheiser --- apps/nogui/nushell/jolheiser.nu | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/apps/nogui/nushell/jolheiser.nu b/apps/nogui/nushell/jolheiser.nu index 0d6e4bc..da8d89c 100644 --- a/apps/nogui/nushell/jolheiser.nu +++ b/apps/nogui/nushell/jolheiser.nu @@ -51,6 +51,11 @@ def clone [ ^git fetch upstream } +def fg [args ...string] { + ^rg --ignore-case --color=always --line-number --no-heading $args + | ^fzf --ansi --color 'hl:-1:underline,hl+:-1:underline:reverse' --delimiter ':' --preview "bat --color=always {1} --theme='ctp-mocha' --highlight-line {2}" --preview-window 'up,60%,border-bottom,+{2}+3/3,~3' --bind $"enter:become\(($env.EDITOR) +{2} {1}\)" +} + ## Other ## $env.EDITOR = hx $env.config = ($env.config | upsert "shell_integration" ("WEZTERM_PANE" not-in $env and "SSH_CLIENT" not-in $env))