From a41c2cc2d31797ac49c26764f22ca760eca89789 Mon Sep 17 00:00:00 2001 From: Steven Xu Date: Wed, 29 Mar 2023 07:38:08 +1100 Subject: [PATCH] Refactor/nu remove dep on sh (#823) * fix: join flags with ` ` * refactor: remove dependency on `sh` --- src/shell/atuin.nu | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/shell/atuin.nu b/src/shell/atuin.nu index f9e70ef..c251f6b 100644 --- a/src/shell/atuin.nu +++ b/src/shell/atuin.nu @@ -28,10 +28,10 @@ def _atuin_search_cmd [...flags: string] { [ $ATUIN_KEYBINDING_TOKEN, ([ - `commandline (sh -c 'RUST_LOG=error atuin search `, - $flags, - ` -i -- "$0" 3>&1 1>&2 2>&3' (commandline))`, - ] | flatten | str join ''), + `commandline (RUST_LOG=error run-external --redirect-stderr atuin search`, + ($flags | append [--interactive, --] | each {|e| $'"($e)"'}), + `(commandline) | complete | $in.stderr | str substring ',-1')`, + ] | flatten | str join ' '), ] | str join "\n" }