2
0
Fork 0
mirror of https://github.com/fish-shell/fish-shell synced 2025-01-16 06:54:03 +00:00
fish-shell/share/functions/__fish_paginate.fish

14 lines
271 B
Fish
Raw Normal View History

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 | string match -q -r -v "$cmd *\$"
2010-09-18 02:18:26 +00:00
commandline -aj " ^&1 |$cmd;"
end
end