GNU ls from Coreutils missing OS X ACL implementation

不羁岁月 提交于 2019-12-07 15:04:25

This is wrong

if [[ ls_flag -eq true ]]; then
   alias ls=/bin/ls
fi

You're missing the $ for $ls_flag and -eq is used for numeric comparison within [[ ... ]]

Since "true" and "false" are commands, you want to write

if $ls_flag; then
   alias ls=/bin/ls
fi

or, more tersely

$ls_flag && alias ls=/bin/ls

You could create an alias:

alias ls=/bin/ls
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!