This repository is private.
All pages are served over SSL and all pushing and pulling is done over SSH.
No one may fork, clone, or view it unless they are added as a member.
Every repository with this icon (
) is private.
Every repository with this icon (
This repository is public.
Anyone may fork, clone, or view it.
Every repository with this icon (
) is public.
Every repository with this icon (
Joshua Timberman (author)
Wed Jun 18 08:46:57 -0700 2008
| 49ff6d66 » | Joshua Timberman | 2008-06-03 | 1 | ############################################################################# | |
| 2 | # Options and settings | ||||
| 3 | ############################################################################# | ||||
| 4 | shopt -s cdspell | ||||
| 5 | shopt -s checkhash | ||||
| 6 | shopt -s checkwinsize | ||||
| 7 | shopt -s cmdhist | ||||
| 8 | shopt -s dotglob | ||||
| 9 | shopt -s extglob | ||||
| 10 | shopt -s lithist | ||||
| 11 | shopt -s nocaseglob | ||||
| 12 | shopt -s no_empty_cmd_completion | ||||
| 13 | set -o vi | ||||
| 14 | set -o notify | ||||
| 15 | set -o allexport | ||||
| 16 | umask 027 | ||||
| 17 | |||||
| 18 | ############################################################################# | ||||
| 19 | # Environment variables | ||||
| 20 | ############################################################################# | ||||
| 21 | PATH="/bin:/sbin:/usr/bin:/usr/sbin:/usr/local/bin:/usr/local/sbin:/usr/X11R6/bin:$HOME/bin" | ||||
| 22 | MANPATH="/usr/man:/usr/local/man:/usr/share/man:/usr/local/share/man:/usr/X11R6/man" | ||||
| 23 | HISTSIZE="5000" | ||||
| 24 | # Set to avoid spamming up the history file | ||||
| 25 | HISTIGNORE="cd:ls:[bf]g:clear:exit" | ||||
| 26 | # Set to timestamp history entries and preserve across sessions | ||||
| 27 | HISTTIMEFORMAT="%D %R: " | ||||
| 28 | VISUAL="vi" | ||||
| 29 | EDITOR="vi" | ||||
| 30 | # this prompt will show the hostname in green if the last command returned 0, | ||||
| 31 | # otherwise it will be red. | ||||
| 32 | PS1="\[\`if [[ \$? = "0" ]]; then echo '\e[32m\h\e[0m'; else echo '\e[31m\h\e[0m' ; fi\`:\w\n\$ " | ||||
| 33 | PS2=" " | ||||
| 34 | PAGER="/usr/bin/less" | ||||
| 35 | # Adjust ls color output for a white background terminal (removes bold). | ||||
| 36 | LS_COLORS='no=00:fi=00:di=00;34:ln=00;36:pi=40;33:so=00;35:do=00;35:bd=40;33;01:cd=40;33;01:or=40;31;01:su=37;41:sg=30;43:ex=00;32:*.tar=00;31:*.tgz=00;31:*.arj=00;31:*.taz=00;31:*.lzh=00;31:*.zip=00;31:*.z=00;31:*.Z=00;31:*.gz=00;31:*.bz2=00;31:*.deb=00;31:*.rpm=00;31:*.jar=00;31:*.jpg=00;35:*.jpeg=00;35:*.gif=00;35:*.bmp=00;35:*.pbm=00;35:*.pgm=00;35:*.ppm=00;35:*.tga=00;35:*.xbm=00;35:*.xpm=00;35:*.tif=00;35:*.tiff=00;35:*.png=00;35:*.mov=00;35:*.mpg=00;35:*.mpeg=00;35:*.avi=00;35:*.fli=00;35:*.gl=00;35:*.dl=00;35:*.xcf=00;35:*.xwd=00;35:*.flac=00;35:*.mp3=00;35:*.mpc=00;35:*.ogg=00;35:*.wav=00;35:' | ||||
| 37 | |||||
| 38 | # Make the titlebar of the window show where we are at if logged in via ssh | ||||
| 39 | # (putty window or X11 window) or from a local GNOME session (ie gnome-terminal) | ||||
| 40 | if [ ! -z $SSH_TTY ] || [ ! -z $GDMSESSION ] | ||||
| 41 | then | ||||
| 42 | PROMPT_COMMAND='echo -ne "\033]0;${HOSTNAME}:${PWD}\007"' | ||||
| 43 | # Run a couple informational commands upon login. | ||||
| 44 | df -h -l | ||||
| 45 | uptime | ||||
| 46 | fi | ||||
| 47 | |||||
| 48 | ############################################################################# | ||||
| 49 | # Aliases | ||||
| 50 | ############################################################################# | ||||
| 51 | # make some common commands more useful. | ||||
| 52 | if [ 'OpenBSD' == `uname` ] | ||||
| 53 | then | ||||
| 54 | alias ls="ls -F" | ||||
| 55 | else | ||||
| 56 | alias ls="ls --color=auto -hF --file-type" | ||||
| 57 | fi | ||||
| 58 | |||||
| 59 | alias lz="ls -FalZ --color=auto" | ||||
| 60 | alias du="du -mcx" | ||||
| 61 | alias df="df -Tm" | ||||
| 62 | alias free="free -m" | ||||
| 63 | alias today="date +%F" | ||||
| 64 | # navigation shortcuts | ||||
| 65 | alias ..="cd .." | ||||
| 66 | alias -- -="cd -" | ||||
| 67 | # old habits die hard | ||||
| 68 | alias more="/usr/bin/less" | ||||
| 69 | # Quickly add sshkey. | ||||
| 0bbbf42e » | Joshua Timberman | 2008-06-05 | 70 | alias sshkey="ssh-add $HOME/.ssh/id_dsa" | |
| 49ff6d66 » | Joshua Timberman | 2008-06-03 | 71 | # vim > vi | |
| 72 | alias vi=/usr/bin/vim | ||||
| 73 | alias ps="COLUMNS=320 ps" | ||||
| 74 | ############################################################################# | ||||
| 75 | # Set up other variables and configuration. | ||||
| 76 | ############################################################################# | ||||
| 77 | if [ -f ~/.bashrc.local ] | ||||
| 78 | then | ||||
| 79 | . ~/.bashrc.local | ||||
| 80 | fi | ||||
| 81 | |||||
| 82 | function lsd { | ||||
| 83 | if [ -d $1 ]; then | ||||
| 84 | cd $1 | ||||
| 85 | shift | ||||
| 86 | ls $@ | ||||
| 87 | else | ||||
| 88 | file $1 | ||||
| 89 | fi | ||||
| 90 | } | ||||
| 91 | |||||
| 92 | # Don't export all variables in the actual shell, just for the profile... | ||||
| 93 | set +o allexport | ||||
| 94 | |||||
| 95 | # vim modeline - have 'set modeline' and 'syntax on' in your ~/.vimrc. | ||||
| 96 | # vi:syntax=sh:filetype=sh:ts=4:et: | ||||
| 97 | # EOF | ||||







