mirror of
https://github.com/fish-shell/fish-shell.git
synced 2025-03-27 14:45:13 +08:00
Fix bug making builtin help for the '.' builtin not show up.
darcs-hash:20070922223828-75c98-41cf335992cd61ef5c958889714766c513d5d5f7.gz
This commit is contained in:
parent
657e3f8147
commit
0679a6351f
@ -1,6 +1,16 @@
|
|||||||
|
|
||||||
function __fish_print_help --description "Print help message for the specified fish function or builtin"
|
function __fish_print_help --description "Print help message for the specified fish function or builtin"
|
||||||
|
|
||||||
|
set -l item
|
||||||
|
|
||||||
|
switch $argv[1]
|
||||||
|
case '.'
|
||||||
|
set item source
|
||||||
|
|
||||||
|
case '*'
|
||||||
|
set item $argv[1]
|
||||||
|
end
|
||||||
|
|
||||||
# These two expressions take care of underlines (Should be italic)
|
# These two expressions take care of underlines (Should be italic)
|
||||||
set -l cmd1 s/_\x08'\(.\)'/(set_color --underline)\\1(set_color normal)/g
|
set -l cmd1 s/_\x08'\(.\)'/(set_color --underline)\\1(set_color normal)/g
|
||||||
set -l cmd2 s/'\(.\)'\x08_/(set_color --underline)\\1(set_color normal)/g
|
set -l cmd2 s/'\(.\)'\x08_/(set_color --underline)\\1(set_color normal)/g
|
||||||
@ -15,7 +25,7 @@ function __fish_print_help --description "Print help message for the specified f
|
|||||||
set -l sed_cmd -e $cmd1 -e $cmd2 -e $cmd3
|
set -l sed_cmd -e $cmd1 -e $cmd2 -e $cmd3
|
||||||
|
|
||||||
# Render help output, save output into the variable 'help'
|
# Render help output, save output into the variable 'help'
|
||||||
set -l help (nroff -man $__fish_datadir/man/$argv.1)
|
set -l help (nroff -man $__fish_datadir/man/$item.1)
|
||||||
set -l lines (count $help)
|
set -l lines (count $help)
|
||||||
|
|
||||||
# Print an empty line first
|
# Print an empty line first
|
||||||
|
Loading…
x
Reference in New Issue
Block a user