mirror of
https://github.com/atuinsh/atuin.git
synced 2025-01-23 23:00:28 +01:00
fix: pass search query in via env for *Nushell* (#1874)
This commit is contained in:
parent
da8cc48198
commit
ad766cc82d
@ -35,10 +35,12 @@ def _atuin_search_cmd [...flags: string] {
|
||||
[
|
||||
$ATUIN_KEYBINDING_TOKEN,
|
||||
([
|
||||
(if $nu_version.0 <= 0 and $nu_version.1 <= 90 { 'commandline' } else { 'commandline edit' }),
|
||||
`(ATUIN_LOG=error run-external --redirect-stderr atuin search`,
|
||||
($flags | append [--interactive, --] | each {|e| $'"($e)"'}),
|
||||
`(commandline) | complete | $in.stderr | str substring ..-1)`,
|
||||
`with-env { ATUIN_LOG: error, ATUIN_QUERY: (commandline) } {`,
|
||||
(if $nu_version.0 <= 0 and $nu_version.1 <= 90 { 'commandline' } else { 'commandline edit' }),
|
||||
`(run-external --redirect-stderr atuin search`,
|
||||
($flags | append [--interactive] | each {|e| $'"($e)"'}),
|
||||
` | complete | $in.stderr | str substring ..-1)`,
|
||||
`}`,
|
||||
] | flatten | str join ' '),
|
||||
] | str join "\n"
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user