From 37a77bcd70781a4fe75c3477f08fbb8a5b2ba858 Mon Sep 17 00:00:00 2001 From: Mike Vink Date: Tue, 11 Feb 2025 08:03:21 +0000 Subject: update prompt --- .config/ksh/ksh.kshrc | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/.config/ksh/ksh.kshrc b/.config/ksh/ksh.kshrc index 578ffa8..000ed44 100644 --- a/.config/ksh/ksh.kshrc +++ b/.config/ksh/ksh.kshrc @@ -11,8 +11,12 @@ bind -m ^O=' lfcd^J' # Emacs mode clear chops off multline prompts. export PS1="$(hostname):/\$( +root=\$(pwd | cut -d'/' -f2- --output-delimiter ' +' | head -n-3 | cut -c1-3 | paste -sd '/') +[ -z \$root ] || echo "\${root}/" +)\$( pwd | cut -d'/' -f2- --output-delimiter ' -' | cut -c1-3 | paste -sd '/' +' | tail -n3 | paste -sd '/' )\$(prompt-git)\n jobs(\j) # " bind -m ^L="^A^K clear^J" -- cgit v1.2.3