From 5570aea502f30121b7c439c04f4e139883fe17ac Mon Sep 17 00:00:00 2001 From: Thomas Voss Date: Thu, 26 Feb 2026 12:36:38 +0100 Subject: bash: Fix newline display issues --- .bashrc | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) (limited to '.bashrc') diff --git a/.bashrc b/.bashrc index 458fc05..a9d8549 100644 --- a/.bashrc +++ b/.bashrc @@ -114,7 +114,16 @@ alias sv=sudoedit alias v="$VISUAL" alias z='2>/dev/null zathura --fork "$@" 2>/dev/null' -PS1='\[\e[96;1m\]\u \[\e[39m\]\W \[\e[96m\]〉\[\e[0m\]' +__ps1_newline() { + local _ y x _ + local RESET="\e[0m" + local HL="\e[30;47m" + + IFS='[;' read -p $'\e[6n' -d R -rs _ y x _ + [[ "$x" != 1 ]] && printf "${HL}␀\n${RESET}" +} + +PS1="\$(__ps1_newline)"'\[\e[96;1m\]\u \[\e[39m\]\W \[\e[96m\]〉\[\e[0m\]' eval "$(fzf --bash)" eval "$(eww shell-completions --shell bash)" -- cgit v1.2.3