Skip to content

Feature request to make gls work on macos with coreutils #1758

@GiHutb

Description

@GiHutb

After installing coreutils via below command

$> brew install coreutils

'gls' and 'gdircolors' are available. So if I do below colors and directory dirs-first is working.

$> git diff
diff --git a/modules/utility/init.zsh b/modules/utility/init.zsh
index a2e5c2b..4400cf0 100644
--- a/modules/utility/init.zsh
+++ b/modules/utility/init.zsh
@@ -73,6 +73,12 @@ if zstyle -T ':prezto:module:utility' safe-ops; then
 fi

 # ls
+
+if is-callable 'gdircolors'; then
+  alias dircolors='gdircolors'
+  alias ls="${aliases[ls]:-gls}"
+fi
+
 if is-callable 'dircolors'; then
   # GNU Core Utilities

Can you check if coreutils has been installed ?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions