diff options
| author | Patrick Decat <pdecat@gmail.com> | 2022-12-18 19:26:09 +0100 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2022-12-18 18:26:09 +0000 |
| commit | ed394afa82ef919937521e5ce72fc467cec203f9 (patch) | |
| tree | bc7d078684089e71d0d96f22328c5c266ad22d28 /src/shell/atuin.bash | |
| parent | Bump debian from bullseye-20221024-slim to bullseye-20221205-slim (#638) (diff) | |
| download | atuin-ed394afa82ef919937521e5ce72fc467cec203f9.zip | |
Allow overriding filter and search modes from CLI (#635)
* Allow overriding filter and search modes from CLI arguments
* Use session filter mode for bash up key binding
* We precisely do not want to add quotes here so that all arguments are properly passed
* Add --shell-up-key-binding hidden command argument and filter_mode_shell_up_key_binding configuration option to allow customizing the filter mode used when atuin is invoked from a shell up-key binding
* Correct up binding for zsh
Co-authored-by: Ellie Huxtable <ellie@elliehuxtable.com>
Diffstat (limited to '')
| -rw-r--r-- | src/shell/atuin.bash | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/src/shell/atuin.bash b/src/shell/atuin.bash index 4530e31e..9c8fa237 100644 --- a/src/shell/atuin.bash +++ b/src/shell/atuin.bash @@ -17,7 +17,8 @@ _atuin_precmd() { __atuin_history () { tput rmkx - HISTORY="$(RUST_LOG=error atuin search -i -- "${READLINE_LINE}" 3>&1 1>&2 2>&3)" + # shellcheck disable=SC2048,SC2086 + HISTORY="$(RUST_LOG=error atuin search $* -i -- "${READLINE_LINE}" 3>&1 1>&2 2>&3)" tput smkx READLINE_LINE=${HISTORY} @@ -34,6 +35,6 @@ fi if [[ -z ${ATUIN_NOBIND} ]]; then bind -x '"\C-r": __atuin_history' - bind -x '"\e[A": __atuin_history' - bind -x '"\eOA": __atuin_history' + bind -x '"\e[A": __atuin_history --shell-up-key-binding' + bind -x '"\eOA": __atuin_history --shell-up-key-binding' fi |
