mirror of
https://github.com/fish-shell/fish-shell.git
synced 2024-11-23 03:03:57 +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
ca6cda20a3
commit
bc693bd4e0
|
@ -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
|
||||
|
|
Loading…
Reference in New Issue
Block a user