minus-squarebeirdobaggins@lemmy.worldtoLinux@lemmy.ml•Share your Bash prompts!linkfedilinkarrow-up4·29 days agoMine shows the full path and a new line for commands. It will also print the exit code of the last command in red above the prompt, if the exit code is not 0. PS1='$(ec=“$?”; if [ $ec -gt 0 ]; then echo -e “\n”[\e[91m]“exit code: $ec”[\e[0m]; fi)\n[\e[92m]\u[\e[38;5;213m]@[\e[38;5;39m]\h[\e[0m]:$PWD\n$ ’ linkfedilink
minus-squarebeirdobaggins@lemmy.worldtoLinux@lemmy.ml•openSUSE Tumbleweed Adopts SELinux as Defaultlinkfedilinkarrow-up3·2 months agoI thought they got rid of the iguana mascot. I guess they realized that it was the best thing about their brand. linkfedilink
Mine shows the full path and a new line for commands.
It will also print the exit code of the last command in red above the prompt, if the exit code is not 0.
PS1='$(ec=“$?”; if [ $ec -gt 0 ]; then echo -e “\n”[\e[91m]“exit code: $ec”[\e[0m]; fi)\n[\e[92m]\u[\e[38;5;213m]@[\e[38;5;39m]\h[\e[0m]:$PWD\n$ ’