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:
Aaron Gyes 2016-07-01 06:01:37 -07:00
parent ca6cda20a3
commit bc693bd4e0

View File

@ -88,8 +88,11 @@ function type --description "Print the type of a command"
switch $mode
case normal
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
echo (_ 'function')
end