mirror of
https://github.com/fish-shell/fish-shell.git
synced 2024-12-01 15:14:26 +08:00
ed489d0d52
This makes it easier to get *any pager* in the number of places we do. Unfortunately: 1. It can't just execute the pager because that might block 2. We can't really set the necessary options for less here so they still need to be set outside. This Fixes #10074 by falling back to `cat` in that case. We could also decide to abort instead of using a non-pager, but for history that's probably fine.
7 lines
182 B
Fish
7 lines
182 B
Fish
function __fish_paginate -d "Paginate the current command using the users default pager"
|
|
set -l cmd (__fish_anypager)
|
|
or return 1
|
|
|
|
fish_commandline_append " &| $cmd"
|
|
end
|