File: __fish_paginate.fish

package info (click to toggle)
fish 4.2.1-3.1
  • links: PTS, VCS
  • area: main
  • in suites: forky
  • size: 35,980 kB
  • sloc: python: 6,972; javascript: 1,407; sh: 1,009; xml: 411; ansic: 230; objc: 78; makefile: 20
file content (11 lines) | stat: -rw-r--r-- 333 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
# localization: skip(private)
function __fish_paginate -d "Paginate the current command using the users default pager"
    set -l cmd (__fish_anypager)
    or return 1

    set -l pipe " &| $cmd"
    if string match -rq -- ' \n\.$' "$(commandline -j; echo .)"
        set pipe "&| $cmd"
    end
    fish_commandline_append $pipe
end