aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPatrick Jackson <patrick@jackson.dev>2023-12-02 03:14:56 -0800
committerGitHub <noreply@github.com>2023-12-02 11:14:56 +0000
commit1ce88c9d17c6dd66d387b2dfd2544a527a262f3e (patch)
tree49b9459c3a5dceee7be2a7c20a46a9dbbb7543e2
parentchore: `cargo update` (#1419) (diff)
downloadatuin-1ce88c9d17c6dd66d387b2dfd2544a527a262f3e.zip
fix(fish): accept multiline commands (#1418)
-rw-r--r--atuin/src/shell/atuin.fish4
1 files changed, 2 insertions, 2 deletions
diff --git a/atuin/src/shell/atuin.fish b/atuin/src/shell/atuin.fish
index bff37443..eeb7d92b 100644
--- a/atuin/src/shell/atuin.fish
+++ b/atuin/src/shell/atuin.fish
@@ -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