diff options
| -rw-r--r-- | atuin/src/shell/atuin.fish | 4 |
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 |
