fix(nu): Update atuin.nu to resolve 0.92 deprecation (#1913)

This commit is contained in:
Wind 2024-04-02 15:27:16 +08:00 committed by GitHub
parent 82a7c8d321
commit 5c4afd6a13
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -37,9 +37,9 @@ def _atuin_search_cmd [...flags: string] {
([ ([
`with-env { ATUIN_LOG: error, ATUIN_QUERY: (commandline) } {`, `with-env { ATUIN_LOG: error, ATUIN_QUERY: (commandline) } {`,
(if $nu_version.0 <= 0 and $nu_version.1 <= 90 { 'commandline' } else { 'commandline edit' }), (if $nu_version.0 <= 0 and $nu_version.1 <= 90 { 'commandline' } else { 'commandline edit' }),
`(run-external --redirect-stderr atuin search`, (if $nu_version.1 >= 92 { '(run-external atuin search' } else { '(run-external --redirect-stderr atuin search' }),
($flags | append [--interactive] | each {|e| $'"($e)"'}), ($flags | append [--interactive] | each {|e| $'"($e)"'}),
` | complete | $in.stderr | str substring ..-1)`, (if $nu_version.1 >= 92 { ' e>| str trim)' } else {' | complete | $in.stderr | str substring ..-1)'}),
`}`, `}`,
] | flatten | str join ' '), ] | flatten | str join ' '),
] | str join "\n" ] | str join "\n"