mirror of
https://github.com/fish-shell/fish-shell.git
synced 2025-02-22 03:05:26 +08:00

I believe apm must have been buggy - example output that I found online showed `tr` was mangling paths with spaces in it. Should be fixed. Also, use dscl on OS X in __fish_complete_users.fish like __fish_print_users.fish already does.
14 lines
243 B
Fish
14 lines
243 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| string match -q -r -v "$cmd *\$"
|
|
|
|
commandline -aj " ^&1 |$cmd;"
|
|
end
|
|
|
|
end
|