Skip to content

Commit

Permalink
fix: pass search query in via env for *Nushell* (#1874)
Browse files Browse the repository at this point in the history
  • Loading branch information
stevenxxiu committed Mar 13, 2024
1 parent da8cc48 commit ad766cc
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions atuin/src/shell/atuin.nu
Original file line number Diff line number Diff line change
Expand Up @@ -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"
}
Expand Down

0 comments on commit ad766cc

Please sign in to comment.