Refactor/nu remove dep on sh (#823)

* fix: join flags with ` `

* refactor: remove dependency on `sh`
This commit is contained in:
Steven Xu 2023-03-29 07:38:08 +11:00 committed by GitHub
parent e9f9f9f994
commit a41c2cc2d3
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -28,10 +28,10 @@ def _atuin_search_cmd [...flags: string] {
[ [
$ATUIN_KEYBINDING_TOKEN, $ATUIN_KEYBINDING_TOKEN,
([ ([
`commandline (sh -c 'RUST_LOG=error atuin search `, `commandline (RUST_LOG=error run-external --redirect-stderr atuin search`,
$flags, ($flags | append [--interactive, --] | each {|e| $'"($e)"'}),
` -i -- "$0" 3>&1 1>&2 2>&3' (commandline))`, `(commandline) | complete | $in.stderr | str substring ',-1')`,
] | flatten | str join ''), ] | flatten | str join ' '),
] | str join "\n" ] | str join "\n"
} }