From bc693bd4e09158b481619dc5815aad72ccbf8d37 Mon Sep 17 00:00:00 2001 From: Aaron Gyes Date: Fri, 1 Jul 2016 06:01:37 -0700 Subject: [PATCH] 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. --- share/functions/type.fish | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/share/functions/type.fish b/share/functions/type.fish index 138783f71..ed113ea5d 100644 --- a/share/functions/type.fish +++ b/share/functions/type.fish @@ -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