mirror of
https://github.com/atuinsh/atuin.git
synced 2025-02-24 22:32:14 +01:00
Handle multiline commands in fish shell (#623)
This commit is contained in:
parent
f3894ef9c0
commit
478af1fa0f
@ -23,10 +23,19 @@ function _atuin_search
|
||||
end
|
||||
|
||||
function _atuin_bind_up
|
||||
if commandline -P
|
||||
# Fallback to fish's builtin up-or-search if we're in search or paging mode
|
||||
if commandline --search-mode; or commandline --paging-mode
|
||||
up-or-search
|
||||
else
|
||||
_atuin_search
|
||||
return
|
||||
end
|
||||
|
||||
# Only invoke atuin if we're on the top line of the command
|
||||
set -l lineno (commandline --line)
|
||||
switch $lineno
|
||||
case 1
|
||||
_atuin_search
|
||||
case '*'
|
||||
up-or-search
|
||||
end
|
||||
end
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user