1

the ctrl + w shortcut does not delete words until the beginning of the line, in bash shell; it gets stuck few characters before (ctrl + c would bring me to a normal new line)

this is something weird I never saw before (maybe related to new macos 14 ?)

any idea? thanks

0

2 Answers 2

3

Does this answer your question?

Bash Ctrl-A Returns to Start of Line but Doesn't Display Properly

If your PS1 has unprintable characters in it, such as color codes, you need to explicitly escape them or bash will think they consume space on the line.

1
  • Excellent analysis. I was struggling to understand this but the link fills in all the back story.
    – bmike
    Commented Dec 8, 2023 at 19:35
0

as far as I can see, this seems the same issue as https://stackoverflow.com/questions/28611464/why-is-my-mac-terminal-acting-buggy-when-i-use-the-up-arrow-key

so, the solution is to fix the PS1 variable

2
  • You should flag as a duplicate rather than post a link-only answer.
    – Barmar
    Commented Dec 8, 2023 at 21:49
  • @barmar Duplicates don’t work across SE sites.
    – nohillside
    Commented Dec 8, 2023 at 22:26

Not the answer you're looking for? Browse other questions tagged .