Skip to content

Instantly share code, notes, and snippets.

@ALEXOTANO
Last active August 26, 2019 16:26
Show Gist options
  • Save ALEXOTANO/df4f86caed0913c94fda481f5835d4ec to your computer and use it in GitHub Desktop.
Save ALEXOTANO/df4f86caed0913c94fda481f5835d4ec to your computer and use it in GitHub Desktop.
my bashrc setting with comments and tips

This is how I configure my bashrc file

# ALEX: WE NEED TO HAVE THE DIRCOLORS FILE - NOT SURE IF THIS COMES AS DEFAULT ON UBUNTU - GOOGLE DIRCOLORS... 
# I DID A BACKUP OF MY DIRCOLORS IN GIST
# enable color support of ls and also add handy aliases
if [ -x /usr/bin/dircolors ]; then
    test -r ~/.dircolors && eval "$(dircolors -b ~/.dircolors)" || eval "$(dircolors -b)"
    alias ls='ls --color=auto'
    #alias dir='dir --color=auto'
    #alias vdir='vdir --color=auto'

    alias grep='grep --color=auto'
    alias fgrep='fgrep --color=auto'
    alias egrep='egrep --color=auto'
fi
########################################################################
####################### CUSTOMS-DE-ALEX ################################
########################################################################

echo "$(tput setaf 7) Configuracion de Alex Activa -- WELCOME  $(tput sgr0)"

# PARA CAMBIAR EL PROMPT DE LA TERMINAL... DESACTIVALO SI VAS A USAR ZSH
PS1="$(printf '\033[1;38;5;70m') \h $(printf '\033[1;38;5;111m')\w \n>$(printf '\033[1;38;5;15m')"

# VARAIBLES DE ENTORNO
export VAR="data-data"
export VAR2="sin-datos"
to see all the available colors
#!/bin/sh
for i in $(seq 0 255)
do
    printf '\033[1;38;5;%dmcolor %d\n' "$i" "$i"
done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment