Skip to content

Conversation

@darkfeline
Copy link

@darkfeline darkfeline commented Oct 27, 2025

If the user is not binding any commands, then there is no need to do
the various bind workarounds. This causes issues if the user
deliberately disabled the bindings because their Bash session does not
have the line editor enabled; attempts to call "bind" will then cause
errors.

Checks

  • I am happy for maintainers to push small adjustments to this PR, to speed up the review cycle
  • I have checked that there are no existing pull requests for the same thing

@darkfeline
Copy link
Author

#2969

Copy link
Contributor

@akinomyoga akinomyoga left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

OK, when preparing #2953, I haven't assumed the case where bind will not be used at all.

One anticipated usage of --disable-up-arrow, --disbale-ctrl-r, or ATUIN_NOBIND is that the user disables the default keybindings and defines keybindings manually by themselves. In this usage, the user is expected to call atuin-bind, which uses the macro chaining anyway. This PR breaks this expected usage.

Could you modify the PR to perform the initialization on the first call of atuin-bind?

@darkfeline darkfeline force-pushed the fix branch 2 times, most recently from 8c1e894 to 150f8b2 Compare November 6, 2025 07:49
@darkfeline darkfeline changed the title fix: Disable Bash macro chain when no binding enabled (#2969) fix: Only initialize Bash macro chain when binding (#2969) Nov 6, 2025
@darkfeline
Copy link
Author

I believe I've addressed the atuin-bind defer as requested.

@darkfeline darkfeline changed the title fix: Only initialize Bash macro chain when binding (#2969) fix: Defer early Bash binds like macro chain (#2969) Nov 6, 2025
If the user is not binding any commands, then there is no need to do
the various bind workarounds.  This causes issues if the user
deliberately disabled the bindings because their Bash session does not
have the line editor enabled; attempts to call "bind" will then cause
errors.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants