mirror of
https://github.com/fish-shell/fish-shell.git
synced 2024-11-22 09:45:25 +08:00
parent
48db9e6a3f
commit
fd8291a96f
|
@ -25,6 +25,7 @@ Interactive improvements
|
|||
- The history pager now uses more screen space, usually half the screen (:issue:`9458`)
|
||||
- Variables that were set while the locale was C (i.e. ASCII) will now properly be encoded if the locale is switched (:issue:`2613`, :issue:`9473`).
|
||||
- Escape during history search restores the original commandline again (regressed in 3.6.0).
|
||||
- Using ``--help`` on builtins now respects the $MANPAGER variable in preference to $PAGER (:issue:`9488`).
|
||||
|
||||
New or improved bindings
|
||||
^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
|
|
|
@ -126,8 +126,12 @@ function __fish_print_help --description "Print help message for the specified f
|
|||
end | string replace -ra '^ ' '' |
|
||||
begin
|
||||
set -l pager less
|
||||
# Try both PAGER and MANPAGER, last one wins
|
||||
set -q PAGER
|
||||
and echo $PAGER | read -at pager
|
||||
and echo -- $PAGER | read -at pager
|
||||
set -q MANPAGER
|
||||
and echo -- $MANPAGER | 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)
|
||||
|
|
Loading…
Reference in New Issue
Block a user