mirror of
https://github.com/fish-shell/fish-shell.git
synced 2024-11-25 09:39:52 +08:00
14 lines
234 B
Fish
14 lines
234 B
Fish
function __fish_paginate -d "Paginate the current command using the users default pager"
|
|
|
|
set -l cmd less
|
|
if set -q PAGER
|
|
set cmd $PAGER
|
|
end
|
|
|
|
if commandline -j|grep -v "$cmd *\$" >/dev/null
|
|
|
|
commandline -aj "|$cmd;"
|
|
end
|
|
|
|
end
|