mirror of
https://github.com/fish-shell/fish-shell
synced 2024-12-29 06:13:20 +00:00
functions/ls: Work around Terminal.app not setting $COLORTERM
Fixes #8309
This commit is contained in:
parent
0562e599a6
commit
5f5bd03911
1 changed files with 9 additions and 0 deletions
|
@ -52,5 +52,14 @@ function ls --description "List contents of directory"
|
||||||
isatty stdout
|
isatty stdout
|
||||||
and set -a opt -F
|
and set -a opt -F
|
||||||
|
|
||||||
|
# Terminal.app doesn't set $COLORTERM or $CLICOLOR,
|
||||||
|
# but the new FreeBSD ls requires either to be set,
|
||||||
|
# before it will enable color.
|
||||||
|
# See #8309.
|
||||||
|
# We don't set $COLORTERM because that should be set to
|
||||||
|
# "truecolor" or similar and we don't want to specify that here.
|
||||||
|
test "$TERM_PROGRAM" = Apple_Terminal
|
||||||
|
and set -fx CLICOLOR 1
|
||||||
|
|
||||||
command $__fish_ls_command $__fish_ls_color_opt $argv
|
command $__fish_ls_command $__fish_ls_color_opt $argv
|
||||||
end
|
end
|
||||||
|
|
Loading…
Reference in a new issue