mirror of
https://github.com/ohmyzsh/ohmyzsh.git
synced 2024-11-11 00:10:08 +00:00
fix(gnu-utils): reset ls alias to use GNU-based --color argument (#11527)
Fixes #11503
This commit is contained in:
parent
277f38212a
commit
cd647b6dc6
1 changed files with 11 additions and 0 deletions
|
@ -61,3 +61,14 @@ __gnu_utils_preexec() {
|
||||||
|
|
||||||
autoload -Uz add-zsh-hook
|
autoload -Uz add-zsh-hook
|
||||||
add-zsh-hook preexec __gnu_utils_preexec
|
add-zsh-hook preexec __gnu_utils_preexec
|
||||||
|
|
||||||
|
# lib/theme-and-appearance.zsh sets the alias for ls not knowing that
|
||||||
|
# we'll be using GNU ls. We'll reset this to use GNU ls --color.
|
||||||
|
# See https://github.com/ohmyzsh/ohmyzsh/issues/11503
|
||||||
|
#
|
||||||
|
# The ls alias might look like:
|
||||||
|
# - ls='ls -G'
|
||||||
|
# - ls='gls --color=tty'
|
||||||
|
if [[ -x "${commands[gls]}" && "${aliases[ls]}" = (*-G*|gls*) ]]; then
|
||||||
|
alias ls='ls --color=tty'
|
||||||
|
fi
|
||||||
|
|
Loading…
Reference in a new issue