mirror of
https://github.com/fish-shell/fish-shell
synced 2024-12-26 12:53:13 +00:00
7659554dea
This removes the use of caret redirections from share/completions and share/functions, in preparation for dropping support in fish.
17 lines
349 B
Fish
17 lines
349 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 test -z (commandline -j)
|
|
commandline -a $history[1]
|
|
end
|
|
|
|
if commandline -j | string match -q -r -v "$cmd *\$"
|
|
|
|
commandline -aj " 2>&1 | $cmd;"
|
|
end
|
|
|
|
end
|