-bash: bash_execute_unix_command: cannot find keymap for command
C-r and C-x C-p show Atuin as expected, though no history is saved since I installed.
I’m on GNU bash, version 4.2.46(2)-release (x86_64-redhat-linux-gnu) (not my call) with bash-preexec 0.5.0 and atuin 18.2.0 , both from homebrew. I use vi keybindings.
Tell that to my sysadmins! Or the CentOS 7 maintainers.
I installed homebrew’s bash (5.2.26(1)-release) and finagled it into being my login shell. The keybinds worked as expected there. (@akinomyoga I’d still be interested in your fix.)
But it’s still not saving new commands. Does that mean I need to look at bash-preexec?
This looks the same on both bash versions:
Atuin Doctor
Checking for diagnostics
[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
Please include the output below with any bug reports or issues
atuin:
version: 18.2.0
sync:
cloud: true
records: false
auto_sync: true
last_sync: 2024-03-08 5:25:03.70084772 +00:00:00
shell:
name: bash
default: unknown
plugins:
- atuin
system:
os: CentOS Linux
arch: x86_64
version: '7'
disks:
- name: /dev/mapper/sysvg-root
filesystem: xfs
- name: /dev/vda1
filesystem: xfs
- name: /dev/mapper/sysvg-data
filesystem: xfs
CentOS 7 is also 10 years old, and they will not change core packages for stability and compatibility once it is released.
Even if the system Bash is old, you do not have to use the system Bash. You can build a new version of Bash, install it in your home directory, and use it for your interactive sessions. OK, you’ve installed a new version through Homebrew.
The patch was already merged.
The result of atuin doctor suggests that you load neither bash-preexec nor ble.sh. You need to enable bash-preexec by sourcing the file somewhere in your Bash startup files. If the system configuration does not load bash-preexec, you need to source bash-preexec in ~/.bashrc.
This is getting weird. I have had bash-preexec installed and sourced the whole time. I don’t think anything’s changed, but now …
atuin doctor looks better
Atuin Doctor
Checking for diagnostics
Please include the output below with any bug reports or issues
atuin:
version: 18.2.0
sync:
cloud: true
records: false
auto_sync: true
last_sync: 2024-03-08 5:25:03.70084772 +00:00:00
shell:
name: bash
default: unknown
plugins:
- atuin
- bash-preexec
system:
os: CentOS Linux
arch: x86_64
version: '7'
disks:
- name: /dev/mapper/sysvg-root
filesystem: xfs
- name: /dev/vda1
filesystem: xfs
- name: /dev/mapper/sysvg-data
filesystem: xfs
For the record, here’s evidence of bash-preexec:
$ brew list --versions | head -3
atuin 18.2.0
bash 5.2.26
bash-preexec 0.5.0
$ [ -r "${HOMEBREW_PREFIX}/etc/profile.d/bash-preexec.sh" ] && echo 'BP is installed'
BP is installed
$ echo "$bash_preexec_imported"
defined
And I source it almost last in .bashrc, as recommended. I abbreviated this above, but here is the very end of the file:
I too had the problem of new commands not being saved. It was driving me crazy!
In the end I realized it was because of including GitHub - micharbet/CLE: Command Live Environment in my .bashrc. I did that a few years ago and completely forgot about it. Realizing that I wasn’t really using any of its features, I just removed it. Now atuin seems to record the history as it should.