Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 5 additions & 2 deletions atuin/src/shell/atuin.bash
Original file line number Diff line number Diff line change
Expand Up @@ -29,8 +29,11 @@ __atuin_history() {
then
HISTORY=${HISTORY#__atuin_accept__:}
# Reprint the prompt, accounting for multiple lines
# shellcheck disable=SC2046
tput cuu $(echo -n "${PS1@P}" | tr -cd '\n' | wc -c)
local __atuin_prompt_offset
__atuin_prompt_offset=$(echo -n "${PS1@P}" | tr -cd '\n' | wc -c)
if ((__atuin_prompt_offset > 0)); then
tput cuu "$__atuin_prompt_offset"
fi
echo "${PS1@P}$HISTORY"

if [[ -n "${BLE_VERSION-}" ]]; then
Expand Down