mirror of
https://github.com/atuinsh/atuin.git
synced 2025-01-16 03:10:21 +01:00
* refactor(nushell): update `commandline` syntax, closes #1733 * refactor(nushell): add backwards compatibility for *Nushell* v0.90.x
This commit is contained in:
parent
2a65f89cd5
commit
1c29702e44
@ -28,10 +28,12 @@ let _atuin_pre_prompt = {||
|
||||
}
|
||||
|
||||
def _atuin_search_cmd [...flags: string] {
|
||||
let nu_version = ($env.NU_VERSION | split row '.' | each { || into int })
|
||||
[
|
||||
$ATUIN_KEYBINDING_TOKEN,
|
||||
([
|
||||
`commandline (ATUIN_LOG=error run-external --redirect-stderr atuin search`,
|
||||
(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)`,
|
||||
] | flatten | str join ' '),
|
||||
|
Loading…
Reference in New Issue
Block a user