Last active
October 16, 2015 08:40
-
-
Save oddcoder/554f8387cc2039caedf3 to your computer and use it in GitHub Desktop.
my bashrc for slackware (can work for any other distro)
This file contains 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
#any text that follows this hashtag # symbol is just a comment | |
#How to use this file? | |
#from the home directory open the file .bashrc in you favourite text editor | |
#(this file is hidden so better to open if from the terminal for simplicity) | |
#if the file doesn't exist create new one | |
# paste the content of this file in your .bashrc | |
#and bang thats ! all | |
#happy *NIXing ;) | |
#setting bash emacs mode up | |
#Commands to take advantage of bash's Emacs Mode: | |
# ctrl+a Move cursor to beginning of line | |
# ctrl+e Move cursor to end of line | |
# meta+b Move cursor back one word | |
# meta+f Move cursor forward one word | |
# ctrl+w Cut the last word | |
# ctrl+u Cut everything before the cursor | |
# ctrl+k Cut everything after the cursor | |
# ctrl+y Paste the last thing to be cut | |
# ctrl+_ Undo | |
#NOTE: meta is usually the alt or escape key. | |
#A combination of ctrl-u to cut the line combined with ctrl-y can be very | |
#helpful. If you are in middle of typing a command and need to return to the | |
#prompt to retrieve more information you can use ctrl-u to save what you have | |
#typed in and after you retrieve the needed information ctrl-y will recover | |
#what was cut. | |
set -o emacs | |
#C++ compiler flags | |
export CPPFLAGS="-g -Wall -Weffc++ -Werror -pedantic -Wextra -pedantic-errors \ | |
-Waggregate-return -Wcast-align -Wcast-qual -Wchar-subscripts -Wcomment \ | |
-Wconversion -Wdisabled-optimization -Werror -Wfloat-equal -Wformat -Wformat=2\ | |
-Wformat-nonliteral -Wformat-security -Wformat-y2k -Wimport -Winit-self \ | |
-Winline -Winvalid-pch -Wunsafe-loop-optimizations -Wlong-long \ | |
-Wmissing-braces -Wmissing-field-initializers -Wmissing-format-attribute \ | |
-Wmissing-include-dirs -Wmissing-noreturn -Wpacked -Wpadded -Wparentheses \ | |
-Wpointer-arith -Wredundant-decls -Wreturn-type -Wsequence-point -Wshadow \ | |
-Wsign-compare -Wstack-protector -Wstrict-aliasing -Wstrict-aliasing=2 \ | |
-Wswitch -Wswitch-default -Wswitch-enum -Wtrigraphs -Wuninitialized \ | |
-Wunknown-pragmas -Wunreachable-code -Wunused -Wunused-function -Wunused-label\ | |
-Wunused-parameter -Wunused-value -Wunused-variable -Wvariadic-macros \ | |
-Wvolatile-register-var -Wwrite-strings" | |
export CXX="g++" | |
#C compiler flags | |
export CFLAGS="-g -ggdb3 -Wall -Wextra -Wfloat-equal -Wundef -Werror \ | |
-std=gnu99 -fverbose-asm -Wshadow -Wpointer-arith -Wcast-align \ | |
-Wstrict-prototypes -Wstrict-overflow=5 -Wwrite-strings -Wconversion \ | |
-Wunreachable-code " | |
export CC="gcc" | |
#color the output of basic commands for clarification | |
alias ls='ls --color=auto' | |
export GREP_OPTIONS='__color=auto' GREP_COLOR='1;32' | |
#this prints the time and the username and the current folder and colored | |
export PS1="\[\033[38;5;11m\]\u\[$(tput sgr0)\]\[\033[38;5;15m\]@\h:\[$(tput s\ | |
gr0)\]\[\033[38;5;6m\][\w]:\[$(tput sgr0)\]\[\033[38;5;15m\] \[$(tput sgr0)\]" | |
#make sure that man pages are updated | |
export MANPATH=/usr/local/share/man:$MANPATH | |
#making rm safe...*NIX doesn't forgive :P | |
alias rm='mv --verbose -f --backup=numbered --target-directory \ | |
~/.local/share/Trash/files/' |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment