]> arthur.barton.de Git - ax-zsh.git/commitdiff
ls: Add support for "lscolors.sh"
authorAlexander Barton <alex@barton.de>
Sun, 28 Apr 2024 18:33:14 +0000 (20:33 +0200)
committerAlexander Barton <alex@barton.de>
Sun, 28 Apr 2024 18:33:14 +0000 (20:33 +0200)
default_plugins/ls/ls.zprofile

index 897b16a66a1400d4f32278b629b0a2b98b3c7868..580b7cd1abc14ed0702184af7d27c8c3af6d374c 100644 (file)
@@ -1,7 +1,11 @@
 # AX-ZSH: Alex' Modular ZSH Configuration
 # ls.zshrc: Setup ls(1)
 
-# Is dircolors(1) available?
-if (( $+commands[dircolors] )); then
+if [[ -r ~/.local/share/lscolors.sh ]]; then
+       # Read lscolors.sh, which should set LS_COLORS;
+       # see <https://github.com/trapd00r/LS_COLORS>.
+       source ~/.local/share/lscolors.sh
+elif (( $+commands[dircolors] )); then
+       # Use dircolors(1):
        eval $(dircolors)
 fi