Skip to content

Commit

Permalink
Remove terminal mode switching (#1170)
Browse files Browse the repository at this point in the history
This was initially in place for when we used a different terminal
backend. That backend required that the terminal be in a specific mode,
or otherwise key modifiers would not be correctly recognized. It was
super frustrating.

Since the move to crossterm, we automatically switch to raw mode: https://github.com/atuinsh/atuin/blob/b48de9bd9d89fb9b6a0044a1b251e5b2ff116387/atuin/src/command/client/search/interactive.rs#L528

Should resolve #987, #650, #909, #492

Should also supercede #1149
  • Loading branch information
ellie authored Aug 14, 2023
1 parent cd6c44c commit e356ffa
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 5 deletions.
2 changes: 0 additions & 2 deletions atuin/src/shell/atuin.bash
Original file line number Diff line number Diff line change
Expand Up @@ -16,10 +16,8 @@ _atuin_precmd() {
}

__atuin_history() {
tput rmkx
# shellcheck disable=SC2048,SC2086
HISTORY="$(RUST_LOG=error atuin search $* -i -- "${READLINE_LINE}" 3>&1 1>&2 2>&3)"
tput smkx

READLINE_LINE=${HISTORY}
READLINE_POINT=${#READLINE_LINE}
Expand Down
3 changes: 0 additions & 3 deletions atuin/src/shell/atuin.zsh
Original file line number Diff line number Diff line change
Expand Up @@ -30,13 +30,10 @@ _atuin_search() {
emulate -L zsh
zle -I

# Switch to cursor mode, then back to application
echoti rmkx
# swap stderr and stdout, so that the tui stuff works
# TODO: not this
# shellcheck disable=SC2048
output=$(RUST_LOG=error atuin search $* -i -- $BUFFER 3>&1 1>&2 2>&3)
echoti smkx

if [[ -n $output ]]; then
RBUFFER=""
Expand Down

1 comment on commit e356ffa

@vercel
Copy link

@vercel vercel bot commented on e356ffa Aug 14, 2023

Choose a reason for hiding this comment

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

Successfully deployed to the following URLs:

atuin-docs – ./

atuin-docs-atuin.vercel.app
atuin-docs.vercel.app
atuin-docs-git-main-atuin.vercel.app

Please sign in to comment.