Last active
November 16, 2024 21:56
-
-
Save Siphonay/c52c5afe587ffe2e0aa716272afd6936 to your computer and use it in GitHub Desktop.
Windows/DOS style prompt for bash
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
winprompt() { | |
printf "%s:%s>" "$(printf "\\$(printf '%03o' $(( $(df -x tmpfs --output=target | tail -n +2 | grep -wn "$(findmnt -T . -o target -n)" | cut -d':' -f1) + 66 )))")" "$(pwd | sed 's/\//\\/g')"; | |
} | |
PS1='$(winprompt)' |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment