Giter Site home page Giter Site logo

ll failed in Monterey Mac about scm_breeze HOT 9 CLOSED

aimuch avatar aimuch commented on August 17, 2024 5
ll failed in Monterey Mac

from scm_breeze.

Comments (9)

kunalkundaje avatar kunalkundaje commented on August 17, 2024

You can replace the default BSD-flavored version of ls with the GNU version to get back that option. brew install coreutils will get you these tools. Some more info here: https://stackoverflow.com/a/57973942

from scm_breeze.

aimuch avatar aimuch commented on August 17, 2024

You can replace the default BSD-flavored version of ls with the GNU version to get back that option. brew install coreutils will get you these tools. Some more info here: https://stackoverflow.com/a/57973942

Think you, it works.👍

from scm_breeze.

pre avatar pre commented on August 17, 2024

A symlink worked for me, without having to add everything from coreutils into my $PATH:

brew install coreutils
ln -s /usr/local/opt/coreutils/libexec/gnubin/ls /usr/local/bin

Then ensure /usr/local/bin is in your $PATH before /bin.

I first tried an alias ls=/usr/local/opt/coreutils/libexec/gnubin/ls but this didn't work since SCM Breeze refers to \ls which disregards any aliases.

from scm_breeze.

gcaprio avatar gcaprio commented on August 17, 2024

Sadly this didn't work for me. Any progress on getting this fixed in the core release?

from scm_breeze.

ghthor avatar ghthor commented on August 17, 2024

I don't have the hardware to test, so I haven't done any work concerning this.

from scm_breeze.

tommym9 avatar tommym9 commented on August 17, 2024

Bumping into this one on Monterey too

from scm_breeze.

alecalve avatar alecalve commented on August 17, 2024

brew install coreutils and this patch fixed it for me:

diff --git a/lib/git/shell_shortcuts.sh b/lib/git/shell_shortcuts.sh
index 43b7215..052b663 100644
--- a/lib/git/shell_shortcuts.sh
+++ b/lib/git/shell_shortcuts.sh
@@ -116,10 +116,10 @@ if [ "$shell_ls_aliases_enabled" = "true" ] && builtin command -v ruby > /dev/nu
     local ll_output
     local ll_command  # Ensure sort ordering of the two invocations is the same
     if [ "$_ls_bsd" != "BSD" ]; then
-      ll_command=(\ls -hv --group-directories-first)
+      ll_command=(\gls -hv --group-directories-first)
       ll_output="$("${ll_command[@]}" -l --color "$@")"
     else
-      ll_command=(\ls)
+      ll_command=(\gls)
       ll_output="$(CLICOLOR_FORCE=1 "${ll_command[@]}" -lG "$@")"
     fi

from scm_breeze.

patbl avatar patbl commented on August 17, 2024

There's already code that's meant to identify macOS, but it's broken on recent macOS versions:

if ! ls --color=auto > /dev/null 2>&1; then
# ls is BSD
_ls_bsd="BSD"
fi

This code runs ls --color=auto and checks whether that results in an error. If it does, the code assumes that the OS is macOS (technically BSD). According to fish-shell/fish-shell#8309, Big Sur added a --color option to ls. So the exit status of ls --color=auto no longer differentiates the BSD version of ls from the GNU version.

from scm_breeze.

patbl avatar patbl commented on August 17, 2024

An easy fix would be to use something like ls --author instead of ls --color=auto.

from scm_breeze.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.