fish-shell/share/functions/__fish_paginate.fish
Johannes Altmanninger 7c2dd694e0 Provide functions to toggle commandline prefix/suffix
This introduces two functions to
- toggle a process prefix, used for adding "sudo"
- add a job suffix, used for adding "&| less"

Not sure if they are very useful; we'll see.

Closes #7905
2021-06-23 20:51:20 +02:00

9 lines
216 B
Fish

function __fish_paginate -d "Paginate the current command using the users default pager"
set -l cmd less
if set -q PAGER
echo $PAGER | read -at cmd
end
fish_commandline_append " &| $cmd"
end