aboutsummaryrefslogtreecommitdiffstats
path: root/README.md
diff options
context:
space:
mode:
authorKoichi Murase <myoga.murase@gmail.com>2024-01-10 23:11:12 +0900
committerGitHub <noreply@github.com>2024-01-10 14:11:12 +0000
commita7bed6146156ce1548446700d2189e0caf6c8a75 (patch)
tree0be91fc4dd07fc370191638a1735668b11d1b17e /README.md
parentfeat: add extended help (#1540) (diff)
downloadatuin-a7bed6146156ce1548446700d2189e0caf6c8a75.zip
fix(bash): work around bash < 4 and introduce initialization guards (#1533)
* fix(bash): add a guard for interactive shells * fix(bash): add a guard for the Bash version * fix(bash): localize READLINE_LINE in bash < 4 In bash < 4, the variables READLINE_LINE and READLINE_POINT are not supported for the shell commands called by `bind -x`. Even if it is not supported, atuin works in not a bad way. However, this sometimes causes a strange behavior by the remaining values of READLINE_LINE set in the previous calls of __atuin_history. In bash < 4, we can consistently use an empty string instead of $READLINE_LINE, and the changes to READLINE_LINE and READLINE_POINT should be localized within the function. * fix(bash): add guard for double initialization In bash, it is customary to reload the settings by sourcing `.bashrc` again after modifying it. In such a case, `eval "$(atuin init bash)"` is executed again. This registers duplicate hooks to `preexec_functions` and `precmd_functions`. To prevent this in this patch, we introduce an include guard, so that the initialization is not performed more than once.
Diffstat (limited to 'README.md')
-rw-r--r--README.md4
1 files changed, 4 insertions, 0 deletions
diff --git a/README.md b/README.md
index 2aa554da..1b893f49 100644
--- a/README.md
+++ b/README.md
@@ -265,6 +265,8 @@ antigen bundle atuinsh/atuin@main
### bash
+Atuin works in `bash >= 3.1`, but we recommend to use Atuin with the recent versions of `bash >= 5`.
+
#### [ble.sh](https://github.com/akinomyoga/ble.sh)
Atuin works best in bash when using [ble.sh](https://github.com/akinomyoga/ble.sh) >= 0.4.
@@ -298,6 +300,8 @@ echo 'eval "$(atuin init bash)"' >> ~/.bashrc
bash-preexec currently has an issue where it will stop honoring `ignorespace`. While Atuin will ignore commands prefixed with whitespace, they may still end up in your bash history. Please check your configuration! All other shells do not have this issue.
+To use Atuin in `bash < 4` with bash-preexec, the option `enter_accept` needs to be turned on (which is so by default).
+
### fish
Add