Merge pull request #318 from ghthor/test-bsd-ls
Switch to output parse of `--version` to determine ls version
This commit is contained in:
@@ -97,7 +97,7 @@ fi
|
|||||||
if [ "$shell_ls_aliases_enabled" = "true" ] && builtin command -v ruby > /dev/null 2>&1; then
|
if [ "$shell_ls_aliases_enabled" = "true" ] && builtin command -v ruby > /dev/null 2>&1; then
|
||||||
# BSD ls is different to Linux (GNU) ls
|
# BSD ls is different to Linux (GNU) ls
|
||||||
# Test for BSD ls
|
# Test for BSD ls
|
||||||
if ! ls --color=auto > /dev/null 2>&1; then
|
if ! (ls --version 2>/dev/null || echo "BSD") | grep GNU >/dev/null 2>&1; then
|
||||||
# ls is BSD
|
# ls is BSD
|
||||||
_ls_bsd="BSD"
|
_ls_bsd="BSD"
|
||||||
fi
|
fi
|
||||||
|
|||||||
Reference in New Issue
Block a user