• 31 Posts
  • 32 Comments
Joined 1 year ago
cake
Cake day: June 19th, 2023

help-circle






















  • .bashrc:

    # Prompt
    # "Make it simple, just the dollar sign"
    # "Say no more, fam"
    # - if error code is not 0, then prepend [N] where N is the error code
    # - if user is root, use red and #
    blue='\e[34m'
    red='\e[31m'
    bold='\e[1m'
    reset='\e[0m'
    PS1='$( status=$?; [ $status -ne 0 ] && echo "[$status] ")\['"$blue""$bold"'\]$\['"$reset"'\] '
    
    if [[ $EUID -eq 0 ]]; then
      PS1='$( status=$?; [ $status -ne 0 ] && echo "[$status] ")\['"$red""$bold"'\]#\['"$reset"'\] '
    fi
    

    .inputrc:

    # vi mode, change to 'emacs' here if you prefer
    set editing-mode vi
    
    # vi INSERT prompt
    set vi-ins-mode-string "\1\e[30;44m\2 INS \1\e[0m\2 "
    
    # vi NORMAL prompt
    set vi-cmd-mode-string "\1\e[30;47m\2 NOR \1\e[0m\2 "