mirror of
https://github.com/atuinsh/atuin.git
synced 2024-12-26 17:09:14 +01:00
fix(fish): accept multiline commands (#1418)
This commit is contained in:
parent
1c3d6c6ce8
commit
1ce88c9d17
@ -18,11 +18,11 @@ function _atuin_postexec --on-event fish_postexec
|
||||
end
|
||||
|
||||
function _atuin_search
|
||||
set -l ATUIN_H (ATUIN_SHELL_FISH=t ATUIN_LOG=error atuin search $argv -i -- (commandline -b) 3>&1 1>&2 2>&3)
|
||||
set -l ATUIN_H "$(ATUIN_SHELL_FISH=t ATUIN_LOG=error atuin search $argv -i -- (commandline -b) 3>&1 1>&2 2>&3)"
|
||||
|
||||
if test -n "$ATUIN_H"
|
||||
if string match --quiet '__atuin_accept__:*' "$ATUIN_H"
|
||||
set -l ATUIN_HIST (string match --regex '__atuin_accept__:(.*|\s*)' "$ATUIN_H" | awk 'NR == 2')
|
||||
set -l ATUIN_HIST "$(string replace "__atuin_accept__:" "" -- "$ATUIN_H")"
|
||||
commandline -r "$ATUIN_HIST"
|
||||
commandline -f repaint
|
||||
commandline -f execute
|
||||
|
Loading…
Reference in New Issue
Block a user