mirror of
https://github.com/fish-shell/fish-shell.git
synced 2026-05-23 21:31:14 -03:00
Handle multiple arguments in $PAGER
$PAGER may contain arguments, and should thus be word-split before invocation.
This commit is contained in:
committed by
Johannes Altmanninger
parent
d91b0f86f4
commit
031d30c8ac
@@ -2,7 +2,7 @@ function __fish_paginate -d "Paginate the current command using the users defaul
|
||||
|
||||
set -l cmd less
|
||||
if set -q PAGER
|
||||
set cmd $PAGER
|
||||
echo $PAGER | read -at cmd
|
||||
end
|
||||
|
||||
if test -z (commandline -j | string join '')
|
||||
|
||||
@@ -110,7 +110,7 @@ function __fish_print_help --description "Print help message for the specified f
|
||||
begin
|
||||
set -l pager less
|
||||
set -q PAGER
|
||||
and set pager $PAGER
|
||||
and echo $PAGER | read -at pager
|
||||
not isatty stdout
|
||||
and set pager cat # cannot use a builtin here
|
||||
# similar to man, but add -F to quit paging when the help output is brief (#6227)
|
||||
|
||||
@@ -86,7 +86,7 @@ function history --description "display or manipulate interactive command histor
|
||||
if isatty stdout
|
||||
set -l pager less
|
||||
set -q PAGER
|
||||
and set pager $PAGER
|
||||
and echo $PAGER | read -at pager
|
||||
|
||||
# If the user hasn't preconfigured less with the $LESS environment variable,
|
||||
# we do so to have it behave like cat if output fits on one screen. Prevent the
|
||||
|
||||
Reference in New Issue
Block a user