Answers:
FreeBSD具有CLICOLOR。
在Linux和任何其他使用GNU工具的系统上,您需要设置LS_COLORS,GREP_COLOR和GREP_OPTIONS ='-color = auto',但是即使如此,您仍然需要运行ls --color=auto。运行info coreutils 'ls invocation'以获取更多详细信息。
我知道避免--color在Linux上键入的最简单方法是使用别名进行ls运行ls --color=auto。
这就是我在.bashrc中放置的内容(嗯,实际上是我的.env,但是就像.bashrc一样),以使其默认情况下发生:
# set default flags
if grep --color=auto --quiet "" "$HOME"/.bashrc >/dev/null 2>&1
then
  alias grep='grep --color=auto'
fi
if ls --color=never --directory / >/dev/null 2>&1
then
  # enable colors with GNU ls
  alias ls='ls --color=auto'
else
  alias ls='ls -F'
fi