1
1
mirror of https://github.com/ellie/atuin.git synced 2024-09-11 21:18:22 +03:00

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) } {`,
(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)"'}),
` | complete | $in.stderr | str substring ..-1)`,
(if $nu_version.1 >= 92 { ' e>| str trim)' } else {' | complete | $in.stderr | str substring ..-1)'}),
`}`,
] | flatten | str join ' '),
] | str join "\n"