mirror of
https://github.com/fish-shell/fish-shell.git
synced 2025-03-27 14:45:13 +08:00
fish_indent type -a's function output and colorize
Doesn't colorize if output is redirected. This is "fun" and indenting happens to make most of the included functions display more narrow and fit better into a terminal window.
This commit is contained in:
parent
3d8e8a8715
commit
cd422e5d78
@ -88,8 +88,11 @@ function type --description "Print the type of a command"
|
|||||||
switch $mode
|
switch $mode
|
||||||
case normal
|
case normal
|
||||||
printf (_ '%s is a function with definition\n') $i
|
printf (_ '%s is a function with definition\n') $i
|
||||||
functions $i
|
if isatty stdout
|
||||||
|
functions $i | fish_indent --ansi
|
||||||
|
else
|
||||||
|
functions $i | fish_indent
|
||||||
|
end
|
||||||
case type
|
case type
|
||||||
echo (_ 'function')
|
echo (_ 'function')
|
||||||
end
|
end
|
||||||
|
Loading…
x
Reference in New Issue
Block a user