mirror of
https://github.com/fish-shell/fish-shell
synced 2024-12-30 14:53:11 +00:00
13 lines
239 B
Fish
13 lines
239 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 " ^&1 |$cmd;"
|
|
end
|
|
|
|
end
|