diff options
| author | Koichi Murase <myoga.murase@gmail.com> | 2025-10-21 04:26:56 +0900 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2025-10-20 12:26:56 -0700 |
| commit | a6abc717b41c96c1205f4d361d0747c4cf21a089 (patch) | |
| tree | 77842fc5a29c2fe8f42718dc2ca598c9e8b7d35a /crates/atuin-server-sqlite | |
| parent | chore: update changelog (diff) | |
| download | atuin-a6abc717b41c96c1205f4d361d0747c4cf21a089.zip | |
feat(bash): use Readline's accept-line for enter_accept (#2953)
<!-- Thank you for making a PR! Bug fixes are always welcome, but if
you're adding a new feature or changing an existing one, we'd really
appreciate if you open an issue, post on the forum, or drop in on
Discord -->
This PR introduces a mechanism to use Readline's `accept-line` to run
the user command properly. The idea is described in [the code
comment](https://github.com/atuinsh/atuin/pull/2953/files#diff-57afeb258339de1b14a8dd3fdc88d1a0e192fd186706e570c44c3ef41f7a8c6dR362-R382)
in the added code. This naturally fixes #2935 because Readline's
`accept-line` also performs the necessary keymap transition.
This PR also fixes the behavior of <kbd>tab</kbd> and <kbd>enter</kbd>
with `enter_accept = false` `in Bash <= 3.2. In the previous
implementation, the selected command was lost in Bash 3.2, but this PR
correctly inserts the selected command into the command line buffer.
This PR adds a utility `atuin-bind` to make it easier to define custom
keybindings. The default bindings are also set up by the new function
`atuin-bind` now. This new function `atuin-bind` arranges all
non-trivial setups to make it possible to call Readline's `accept-line`.
The old mechanism using `__atuin_accept_line` is kept for existing users
who set up custom keybindings (without using the new function
`atuin-bind`).
## Checks
- [x] I am happy for maintainers to push small adjustments to this PR,
to speed up the review cycle
- [x] I have checked that there are no existing pull requests for the
same thing
Diffstat (limited to 'crates/atuin-server-sqlite')
0 files changed, 0 insertions, 0 deletions
