mirror of
https://github.com/fish-shell/fish-shell
synced 2025-01-26 03:35:17 +00: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
1 changed files with 5 additions and 2 deletions
|
@ -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…
Reference in a new issue