summaryrefslogtreecommitdiff
path: root/.bashrc
diff options
context:
space:
mode:
authorThomas Voss <mail@thomasvoss.com> 2026-02-26 12:36:38 +0100
committerThomas Voss <mail@thomasvoss.com> 2026-02-26 12:36:38 +0100
commit5570aea502f30121b7c439c04f4e139883fe17ac (patch)
tree097ced3efb05b278bb779d1d9c56fc27b30256f8 /.bashrc
parente7590d3a40d23d02e0223cda05f4b4e25438ef93 (diff)
bash: Fix newline display issues
Diffstat (limited to '.bashrc')
-rw-r--r--.bashrc11
1 files changed, 10 insertions, 1 deletions
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)"