mirror of
https://github.com/fish-shell/fish-shell
synced 2024-11-15 09:27:38 +00:00
3ca3b6209d
darcs-hash:20071006103231-75c98-59ef22ad49526f52cff8a97d9fac9f003af19213.gz
13 lines
235 B
Fish
13 lines
235 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
|