diff --git a/share/functions/__fish_paginate.fish b/share/functions/__fish_paginate.fish index 696dbfdfc..ffe064026 100644 --- a/share/functions/__fish_paginate.fish +++ b/share/functions/__fish_paginate.fish @@ -3,5 +3,9 @@ function __fish_paginate -d "Paginate the current command using the users defaul set -l cmd (__fish_anypager) or return 1 - fish_commandline_append " &| $cmd" + set -l pipe " &| $cmd" + if string match -rq -- ' \n\.$' "$(commandline -j; echo .)" + set pipe "&| $cmd" + end + fish_commandline_append $pipe end