Last active
December 15, 2015 02:21
-
-
Save demoive/11163607 to your computer and use it in GitHub Desktop.
My Bash Stuff
This file contains hidden or 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
# .bash_logout | |
# Executed after logout of bash shells | |
clear |
This file contains hidden or 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
# .bash_profile | |
# Executed for login bash shells | |
# Get the aliases and functions | |
if [ -f ~/.bashrc ]; then | |
. ~/.bashrc | |
fi |
This file contains hidden or 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
# .bashrc | |
# Executed for interactive bash shells | |
#mydate=`date "+%H:%M:%S %m/%d/%y"` | |
#cal_history=`calendar -l 0 -f /usr/share/calendar/calendar.history` | |
#echo | |
#echo "On this day in history..." | |
#echo "$cal_history" | |
#echo | |
#echo `curl -s -m 5 http://www.familyguyquotes.com/random-plaintext.php` | |
#echo | |
# Increase the user limit of concurrent open files (default is 256) | |
ulimit -n 1024 | |
# Sets the editor to (hopefully) be used by programs | |
export EDITOR=vim | |
# Increase the bash history | |
export HISTSIZE=1000 | |
export HISTFILESIZE=1000 | |
# Set the window title to the current directory | |
# PROMPT_COMMAND='echo -ne "\033]0;${USER}@${HOSTNAME}: ${PWD}\007"' | |
PROMPT_COMMAND='echo -ne "\033]0;${USER}@${HOSTNAME%%.*}:${PWD/#$HOME/~}"; echo -ne "\007"' | |
# Aliases | |
#alias rm="mv ~./Trash" # OS X only | |
alias rm="rm -i" | |
alias rmdir="rm -iR" | |
alias srm="rm -iP" # (-P OS X only) | |
alias srmdir="rm -RiP" # like "ripping" a piece of paper :-P | |
alias mv="mv -i" | |
alias cp="cp -ip" | |
alias cpdir="cp -Rip" | |
#alias ls="ls -G" | |
alias ll="ls -lhG" | |
alias la="ls -lhAG" | |
alias lr="ls -RF | less" | |
alias lR="ls -lhR | less" | |
alias h="history | less +G" | |
#alias h="history | tail -n 15" | |
#alias hh="history | less" | |
alias hgrep="history | grep $1" | |
#alias htail="history | tail if[$1]; then -n $1 fi" | |
#alias cd..='cd ..' | |
#alias ..='cd ..' | |
#alias ...='cd ../../../' | |
#alias ....='cd ../../../../' | |
#alias .....='cd ../../../../' | |
#alias ..2='cd ../../' | |
#alias ..3='cd ../../../' | |
#alias ..4='cd ../../../../' | |
#alias ..5='cd ../../../../../' | |
alias j='jobs -l' | |
alias hr='echo "##################################################"' | |
alias server='open http://localhost:8000 && python -m SimpleHTTPServer' | |
#alias cpe461="cd ~/Sites/Projects/SeniorProject/; enscript -E --color -Whtml --toc -p source/index.html *.php *.inc *.html" | |
#export JAVA_HOME=/Library/Java/Home | |
# Sets the prompt: | |
#PS1='\h:\w \u\$ ' | |
#PS2='> ' | |
#PS1='[\!] \h:\w \$ ' | |
#PS1='\[\033[$(($RANDOM % 6 + 40))m\]\h\[\033[0m\]:\W \u\$ ' # Random background color | |
## || ++++++++++++++++++++++||^^|| ++||^^^^^^^^^ | |
# \A - The current time in 24-hour HH:MM format | |
# \a - The ASCII bell character (you can also type \007) | |
# \d - Date in "Wed Sep 06" format | |
# \e - ASCII escape character (you can also type \033) | |
# \h - First part of hostname (such as "mybox") | |
# \H - Full hostname (such as "mybox.mydomain.com") | |
# \j - The number of processes you've suspended in this shell by hitting ^Z | |
# \l - The name of the shell's terminal device (such as "ttyp4") | |
# \n - Newline | |
# \r - Carriage return | |
# \s - The name of the shell executable (such as "bash") | |
# \t - Time in 24-hour format (such as "23:01:01") | |
# \T - Time in 12-hour format (such as "11:01:01") | |
# \@ - Time in 12-hour format with am/pm | |
# \u - Your username | |
# \v - Version of bash (such as 2.04) | |
# \V - Bash version, including patchlevel | |
# \w - Current working directory (such as "/home/pravila") | |
# \W - The "basename" of the current working directory (such as "pravila") | |
# \! - Current command's position in the history buffer | |
# \# - Command number (this will count up at each prompt, as long as you type something) | |
# \$ - If you are not root, inserts a "$"; if you are root, you get a "#" | |
# \xxx - Inserts an ASCII character based on three-digit number xxx (replace unused digits with zeros, such as "\007") | |
# \\ - A backslash | |
# \[ - This sequence should appear before a sequence of characters that don't move the cursor (like color escape sequences). This allows bash to calculate word wrapping correctly. | |
# \] - This sequence should appear after a sequence of non-printing characters. | |
# !m | |
# !-5 | |
# !?-L?! | |
# ^-l^-la^ | |
# mail [email protected] < message.txt | |
## | |
# DELUXE-USR-LOCAL-BIN-INSERT | |
# (do not remove this comment) | |
## | |
echo $PATH | grep -q -s "/usr/local/bin" | |
if [ $? -eq 1 ] ; then | |
PATH=$PATH:/usr/local/bin | |
export PATH | |
fi |
This file contains hidden or 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
# .inputrc | |
# Customize Readline library keybindings | |
# Uses what's already typed as filters for up/down history navigation | |
"\e[A": history-search-backward | |
"\e[B": history-search-forward | |
set show-all-if-ambiguous on | |
set completion-ignore-case on |
This file contains hidden or 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
# .profile | |
# Executed for any login shell |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Just logging this here until I figure out where to put it: