Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- # The following lines were added by compinstall
- zstyle ':completion:*' completer _expand _complete _approximate
- zstyle ':completion:*' expand prefix suffix
- zstyle ':completion:*' list-colors ''
- zstyle ':completion:*' list-prompt %SAt %p: Hit TAB for more, or the character to insert%s
- zstyle ':completion:*' list-suffixes true
- zstyle ':completion:*' matcher-list 'r:|[._-]=** r:|=** l:|=*' 'r:|[._-]=** r:|=** l:|=*'
- zstyle ':completion:*' max-errors 1
- zstyle ':completion:*' menu select=0
- zstyle ':completion:*' select-prompt %SScrolling active: current selection at %p%s
- zstyle ':completion:*' squeeze-slashes true
- #zstyle :compinstall filename '/home/sara/.zshrc'
- fpath=(~/.zsh $fpath)
- #autoload -U ~/.zsh/*
- autoload -U compinit
- compinit
- # Set up some history stuff... the last 500 commands are saved
- # in ~/.zsh_history
- HISTSIZE=500
- HISTFILE="$HOME/.zsh_history"
- SAVEHIST=500
- #setup hostname in title bar of window thing:
- echo -n "\033]0;${USER}@${HOST}\007"
- case $TERM in
- xterm*)
- preexec () {
- print -Pn "\e]0;$*\a"
- }
- ;;
- esac
- preexec () { print -Pn "\e]0;$1\a" };
- # Configure compile environment for me!
- export PATH=~/bin:~/local/bin:~/local/etc:/opt/local/bin:/opt/local/Library/Frameworks/Python.framework/Versions/2.4/bin:$HOME/.local/bin:$HOME/.cabal/bin:$PATH
- # Set the prompt to "[bold{user@host}]relative_working_directory$ "
- PS1="[%B%t %n@%m%b]%~$ "
- RPS1=''%(?,"$(print '%{\e[1;35m%}:-)%{\e[0m%}')","$(print '%{\e[1;31m%}:-(%{\e[0m%}')")''
- # Use less as the default pager, and -X to stop clearing on exit in
- # an xterm i.e. makes it nice for GNUplot help! The -M gives more
- # verbose info.
- PAGER='less -X -M'
- export PS1 PAGER EDITOR SAVEHIST HISTFILE HISTSIZE
- # Other settings
- export EDITOR="vim"
- # No messy core dumps!
- ulimit -c 0
- # Set up the file creation mask
- umask 022
- # Set up the colour ls option if we are running on a Linux
- # machine. Use the default bash colours, if they exist.
- if [ -e /etc/DIR_COLORS ] ; then
- eval `dircolors -b /etc/DIR_COLORS`
- fi
- # makes dirs pink!
- LS_COLORS='no=00:fi=00:di=01;35:ln=01;36:pi=40;33:so=01;35:do=01;35:bd=40;33;01:cd=40;33;01:or=40;31;01:ex=01;32:*.tar=01;31:*.tgz=01;31:*.arj=01;31:*.taz=01;31:*.lzh=01;31:*.zip=01;31:*.z=01;31:*.Z=01;31:*.gz=01;31:*.bz2=01;31:*.deb=01;31:*.rpm=01;31:*.jar=01;31:*.jpg=01;35:*.jpeg=01;35:*.gif=01;35:*.bmp=01;35:*.pbm=01;35:*.pgm=01;35:*.ppm=01;35:*.tga=01;35:*.xbm=01;35:*.xpm=01;35:*.tif=01;35:*.tiff=01;35:*.png=01;35:*.mov=01;35:*.mpg=01;35:*.mpeg=01;35:*.avi=01;35:*.fli=01;35:*.gl=01;35:*.dl=01;35:*.xcf=01;35:*.xwd=01;35:*.ogg=01;35:*.mp3=01;35:*.wav=01;35:';
- export LS_COLORS
- # Set up some useful aliases
- alias pyp='/opt/local/bin/python'
- alias ls='/bin/ls -F $LS_OPT2'
- alias f=finger
- alias xfig='xfig -metric -startgridmode 1'
- alias less='less -X -M'
- alias ll='ls -lF'
- alias la='ls -AF'
- alias l='ls -CF'
- alias dir='ls -F --color=auto --format=vertical'
- alias vdir='ls -F --color=auto --format=long'
- export CSCOPE_EDITOR=gvi
- # For ms-dos floppy tools I generally prefer to turn off
- # file globbing (evaluation of *, ? etc). You can still
- # use tab expansion of wildcards to effectively over-ride
- # this option. The same is true for find.
- alias mdir='noglob mdir'
- alias mcopy='noglob mcopy'
- alias mdel='noglob mdel'
- alias find='noglob find'
- # Program some nice completion things. First some useful
- # arrays:
- hosts=("${(s: :)${(s: :)${${(f)$(</etc/hosts)}%%\#*}#*[ ]*}}")
- groups=( "${${(f)$(</etc/group)}%%:*}" )
- bindkey "\e[1~" beginning-of-line
- bindkey "\e[H" beginning-of-line
- bindkey "\e[2~" transpose-words
- bindkey "\e[3~" delete-char
- bindkey "\e[4~" end-of-line
- bindkey "\e[F" end-of-line
- # see if ssh-agent has been run; if not, run it
- if [ ! -S $SSH_AUTH_SOCK ]; then
- ssh-agent -a $SSH_AUTH_SOCK > /dev/null
- fi
- export LC_CTYPE=en_AU.UTF-8
- export LANG=en_AU.UTF-8
- function proxy_on() {
- export no_proxy="localhost,127.0.0.1,localaddress,.localdomain.com"
- if (( $# > 0 )); then
- valid=$(echo $@ | sed -n 's/\([0-9]\{1,3\}.\?\)\{4\}:\([0-9]\+\)/&/p')
- if [[ $valid != $@ ]]; then
- >&2 echo "Invalid address"
- return 1
- fi
- local proxy=$1
- export http_proxy="$proxy" \
- https_proxy=$proxy \
- ftp_proxy=$proxy \
- rsync_proxy=$proxy
- echo "Proxy environment variable set."
- return 0
- fi
- #echo -n "username: "; read username
- #if [[ $username != "" ]]; then
- # echo -n "password: "
- # read -es password
- # local pre="$username:$password@"
- #fi
- #echo -n "server: "; read server
- #echo -n "port: "; read port
- #local proxy=$pre$server:$port
- local proxy="http://172.16.54.139:9090"
- export http_proxy="$proxy" \
- https_proxy=$proxy \
- ftp_proxy=$proxy \
- rsync_proxy=$proxy \
- HTTP_PROXY=$proxy \
- HTTPS_PROXY=$proxy \
- FTP_PROXY=$proxy \
- RSYNC_PROXY=$proxy
- }
- function proxy_off(){
- unset http_proxy https_proxy ftp_proxy rsync_proxy \
- HTTP_PROXY HTTPS_PROXY FTP_PROXY RSYNC_PROXY
- echo -e "Proxy environment variable removed."
- }
- # added by Pew
- source "$(pew shell_config)"
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement