diff options
| author | Thomas Voss <mail@thomasvoss.com> | 2026-02-26 12:36:38 +0100 |
|---|---|---|
| committer | Thomas Voss <mail@thomasvoss.com> | 2026-02-26 12:36:38 +0100 |
| commit | 5570aea502f30121b7c439c04f4e139883fe17ac (patch) | |
| tree | 097ced3efb05b278bb779d1d9c56fc27b30256f8 /.bashrc | |
| parent | e7590d3a40d23d02e0223cda05f4b4e25438ef93 (diff) | |
bash: Fix newline display issues
Diffstat (limited to '.bashrc')
| -rw-r--r-- | .bashrc | 11 |
1 files changed, 10 insertions, 1 deletions
@@ -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)" |