minus-squarebeirdobaggins@lemmy.worldtoLinux@lemmy.ml•Share your Bash prompts!linkfedilinkarrow-up0·12 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.worldtoSelfhosted@lemmy.world•Convert Existing Oracle Cloud instance from Ubuntu to DebianlinkfedilinkEnglisharrow-up0·12 days agoInteresting. I just imported a Debian cloud image. 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$ ’