Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Reverse-search in bash leads to wrong cursor positioning #5848

Open
patrickjane opened this issue Mar 18, 2024 · 1 comment
Open

Reverse-search in bash leads to wrong cursor positioning #5848

patrickjane opened this issue Mar 18, 2024 · 1 comment
Labels
🐛 bug Something isn't working as expected.

Comments

@patrickjane
Copy link

Bug Report

Current Behavior

When using CTRL+R to trigger backwards search in bash history, selecting a command, then pressing ESC to use the command, in the resulting prompt the cursor will have the wrong position. The line seems to be shorter than it actually is, while the line still prints characters "behind" (to the right of) the cursor.

Expected Behavior

Cursor position / line length should be correct.

Additional context/Screenshots

Bildschirmfoto 2024-03-18 um 08 45 49 Bildschirmfoto 2024-03-18 um 08 45 56 Bildschirmfoto 2024-03-18 um 08 46 05

Possible Solution

n/a

Environment

  • Starship version: 1.17.1
  • Shell type: bash
  • Shell version: 3.2.57
  • Shell plugin manager: n/a
  • Terminal emulator: "terminal"
  • Operating system: macOS 12.7

Relevant Shell Configuration

export STARSHIP_CONFIG=$HOME/.config/starship.toml
eval "$(/opt/homebrew/bin/starship init bash)"

Starship Configuration

# Get editor completions based on the config schema
"$schema" = 'https://starship.rs/config-schema.json'

# Inserts a blank line between shell prompts
add_newline = false

format = """$time$kubernetes$directory$git_branch$git_status> """

[package]
disabled = true

[git_branch]
symbol = ''
style = 'red'

[git_status]
ahead = '⇡${count}'
diverged = '⇕⇡${ahead_count}⇣${behind_count}'
behind = '⇣${count}'
modified = "M"
renamed = "R"
deleted = "D"
conflicted = "x"

[directory]
truncation_length = 100
truncate_to_repo = false
style = 'black'

[time]
disabled = false
format = '[$time]($style) '
time_format = '%T'
#utc_time_offset = '0'
time_range = '00:00:00-23:59:59'
style = 'black'

[kubernetes]
format = '⎈ [$context]($style) '
disabled = false
@patrickjane patrickjane added the 🐛 bug Something isn't working as expected. label Mar 18, 2024
@Sberm
Copy link

Sberm commented Mar 23, 2024

I reproduced the problem on my terminal

1 2

also the text 11:07:06 ⎈ minikube ~ > appears to be deletable

3

I think the cursor somehow went to the start of the line...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🐛 bug Something isn't working as expected.
Projects
None yet
Development

No branches or pull requests

2 participants