diff options
author | Ellie Huxtable <ellie@elliehuxtable.com> | 2023-10-26 18:29:25 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-10-26 18:29:25 +0100 |
commit | 5ca346b40c7721ad28cde37d14ca3ca273184d05 (patch) | |
tree | 6323e69f742b01ceb0f6e99480296ca6811a54cf | |
parent | b7adf1d797f43d8547751bf7923db66c2d01c107 (diff) |
Silence fish string match (#1336)
Oops. `string match` is a bit too noisy, make it quiet. Also print the
match before executing it.
Resolve #1335
-rw-r--r-- | atuin/src/shell/atuin.fish | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/atuin/src/shell/atuin.fish b/atuin/src/shell/atuin.fish index 2f007fcf..061ea8d1 100644 --- a/atuin/src/shell/atuin.fish +++ b/atuin/src/shell/atuin.fish @@ -19,15 +19,18 @@ end function _atuin_search set h (ATUIN_SHELL_FISH=t ATUIN_LOG=error atuin search $argv -i -- (commandline -b) 3>&1 1>&2 2>&3) - commandline -f repaint if test -n "$h" - if string match -g '__atuin_accept__:*' "$h" - eval (string match -r '__atuin_accept__:(.*|\s*)' "$h" | awk 'NR == 2') + if string match -qg '__atuin_accept__:*' "$h" + set hist (string match -r '__atuin_accept__:(.*|\s*)' "$h" | awk 'NR == 2') + echo $hist + eval $hist else commandline -r "$h" end end + + commandline -f repaint end function _atuin_bind_up |