mirror of
https://github.com/fish-shell/fish-shell.git
synced 2024-11-23 02:27:28 +08:00
__fish_paginate: move the cursor to end of recalled commandline
When pressing \ep on an empty commandline, the cursor would stay at the beginning of the commandline. Move it to the end of the previous command, this feels a bit more natural.
This commit is contained in:
parent
07c8608034
commit
6ec0b583f5
|
@ -6,11 +6,10 @@ function __fish_paginate -d "Paginate the current command using the users defaul
|
|||
end
|
||||
|
||||
if test -z (commandline -j | string join '')
|
||||
commandline -a $history[1]
|
||||
commandline -i $history[1]
|
||||
end
|
||||
|
||||
if commandline -j | string match -q -r -v "$cmd *\$"
|
||||
|
||||
if commandline -j | not string match -q -r "$cmd *\$"
|
||||
commandline -aj " &| $cmd;"
|
||||
end
|
||||
|
||||
|
|
Loading…
Reference in New Issue
Block a user