Giter VIP home page Giter VIP logo

Comments (7)

akinomyoga avatar akinomyoga commented on August 16, 2024 1

Ok, I got it. I install gnu coreutils, which provide a stty in /opt/homebrew/opt/coreutils/libexec/gnubin/stty. After I remove /opt/homebrew/opt/coreutils/libexec/gnubin from PATH, it works without warning.

OK. It is known that stty from GNU coreutils doesn't work in macOS. You should set PATH up so that /bin/stty is found first. For example, you can put a symbolic link to /bin/stty in ~/bin or some directory appearing in PATH earlier than /opt/homebrew/opt/coreutils/libexec/gnubin.

But when I exec atuin doctor, the warning is still there, is it safe to ignore?

[Shell] If you are using Bash, Atuin requires that either bash-preexec or ble.sh be installed. An older ble.sh may not be detected. so ignore this if you have it set up! Read more here: https://docs.atuin.sh/guide/installation/#bash

The first picture of #2027 (comment) tells that bash-preexec is correctly loaded in your session, so you can ignore the above warning message. The detection by atuin doctor is not perfect, so it might raise a false-positive error.

Why atuin didn't work with gnu coreutils?

Because Atuin uses stty in its integration for bash-preexec. If stty in the system is not working, it causes a problem.

from atuin.

akinomyoga avatar akinomyoga commented on August 16, 2024

BTW, I use bash on macOS, and install bash-preexec using brew.

[ -f /opt/homebrew/etc/profile.d/bash-preexec.sh ] && . /opt/homebrew/etc/profile.d/bash-preexec.sh
eval "$(atuin init bash)"

The setup might not be working correctly. Your result of atuin doctor contains the following message:

[Shell] If you are using Bash, Atuin requires that either bash-preexec or ble.sh be installed. An older ble.sh may not be detected. so ignore this if you have it set up! Read more here: https://docs.atuin.sh/guide/installation/#bash

This implies that the bash-preexec is not detected in interactive sessions. What is the result of the following commands (in a session where the error message arises)?

$ ls -la /opt/homebrew/etc/profile.d/bash-preexec.sh
$ declare -p __bp_imported

If you also use ble.sh, it might also be related to ble.sh. I received a report to ble.sh with the same error message in macOS but couldn't get the details. Although I don't have a macOS system, it doesn't seem to reproduce in all the macOS environments since I only received the report twice (including this) although there are many macOS users. If it is related to ble.sh, I need your help to identify the cause.

If you use ble.sh, could you check the results of the following commands?

$ type -a stty
$ declare -p _ble_term_stty_flags_{enter,leave}
$ type ble/bin/stty

from atuin.

xiaozhuai avatar xiaozhuai commented on August 16, 2024
$ ls -la /opt/homebrew/etc/profile.d/bash-preexec.sh
$ declare -p __bp_imported
image

I didn't install ble.sh

$ type -a stty
$ declare -p _ble_term_stty_flags_{enter,leave}
$ type ble/bin/stty
image

from atuin.

xiaozhuai avatar xiaozhuai commented on August 16, 2024

Ok, I got it. I install gnu coreutils, which provide a stty in /opt/homebrew/opt/coreutils/libexec/gnubin/stty.
After I remove /opt/homebrew/opt/coreutils/libexec/gnubin from PATH, it works without warning.
But when I exec atuin doctor, the warning is still there, is it safe to ignore?

[Shell] If you are using Bash, Atuin requires that either bash-preexec or ble.sh be installed. An older ble.sh may not be detected. so ignore this if you have it set up! Read more here: https://docs.atuin.sh/guide/installation/#bash

Why atuin didn't work with gnu coreutils?

from atuin.

xiaozhuai avatar xiaozhuai commented on August 16, 2024
image

The stty is bsd stty provided by macOS.
The gstty is gnu stty provided by coreutils package in homebrew.

from atuin.

xiaozhuai avatar xiaozhuai commented on August 16, 2024

@akinomyoga Thank you very much.

If stty in the system is not working, it causes a problem.

I've tried gnu's stty, it works well. Anything I can do to help?

from atuin.

ellie avatar ellie commented on August 16, 2024

I've tried gnu's stty, it works well

Given the existence of this issue, I don't think this statement is accurate.

Using a mixed userspace is unlikely to work well across tools. Please use the BSD/macOS stty - I can't think of a reason as to why you'd prefer to use the GNU one?

from atuin.

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.