Advertisement
Guest User

Untitled

a guest
Dec 2nd, 2019
339
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 5.29 KB | None | 0 0
  1.  
  2. # The following lines were added by compinstall
  3.  
  4. zstyle ':completion:*' completer _expand _complete _approximate
  5. zstyle ':completion:*' expand prefix suffix
  6. zstyle ':completion:*' list-colors ''
  7. zstyle ':completion:*' list-prompt %SAt %p: Hit TAB for more, or the character to insert%s
  8. zstyle ':completion:*' list-suffixes true
  9. zstyle ':completion:*' matcher-list 'r:|[._-]=** r:|=** l:|=*' 'r:|[._-]=** r:|=** l:|=*'
  10. zstyle ':completion:*' max-errors 1
  11. zstyle ':completion:*' menu select=0
  12. zstyle ':completion:*' select-prompt %SScrolling active: current selection at %p%s
  13. zstyle ':completion:*' squeeze-slashes true
  14. #zstyle :compinstall filename '/home/sara/.zshrc'
  15.  
  16. fpath=(~/.zsh $fpath)
  17. #autoload -U ~/.zsh/*
  18. autoload -U compinit
  19. compinit
  20.  
  21. # Set up some history stuff... the last 500 commands are saved
  22. # in ~/.zsh_history
  23.  
  24. HISTSIZE=500
  25. HISTFILE="$HOME/.zsh_history"
  26. SAVEHIST=500
  27.  
  28. #setup hostname in title bar of window thing:
  29. echo -n "\033]0;${USER}@${HOST}\007"
  30.  
  31. case $TERM in
  32. xterm*)
  33. preexec () {
  34. print -Pn "\e]0;$*\a"
  35. }
  36. ;;
  37. esac
  38.  
  39. preexec () { print -Pn "\e]0;$1\a" };
  40.  
  41.  
  42.  
  43. # Configure compile environment for me!
  44. 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
  45.  
  46. # Set the prompt to "[bold{user@host}]relative_working_directory$ "
  47.  
  48. PS1="[%B%t %n@%m%b]%~$ "
  49. RPS1=''%(?,"$(print '%{\e[1;35m%}:-)%{\e[0m%}')","$(print '%{\e[1;31m%}:-(%{\e[0m%}')")''
  50.  
  51.  
  52. # Use less as the default pager, and -X to stop clearing on exit in
  53. # an xterm i.e. makes it nice for GNUplot help! The -M gives more
  54. # verbose info.
  55.  
  56. PAGER='less -X -M'
  57.  
  58. export PS1 PAGER EDITOR SAVEHIST HISTFILE HISTSIZE
  59.  
  60. # Other settings
  61. export EDITOR="vim"
  62.  
  63. # No messy core dumps!
  64.  
  65. ulimit -c 0
  66.  
  67. # Set up the file creation mask
  68.  
  69. umask 022
  70.  
  71. # Set up the colour ls option if we are running on a Linux
  72. # machine. Use the default bash colours, if they exist.
  73.  
  74.  
  75. if [ -e /etc/DIR_COLORS ] ; then
  76. eval `dircolors -b /etc/DIR_COLORS`
  77. fi
  78.  
  79. # makes dirs pink!
  80. 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:';
  81. export LS_COLORS
  82.  
  83. # Set up some useful aliases
  84.  
  85. alias pyp='/opt/local/bin/python'
  86. alias ls='/bin/ls -F $LS_OPT2'
  87. alias f=finger
  88. alias xfig='xfig -metric -startgridmode 1'
  89. alias less='less -X -M'
  90. alias ll='ls -lF'
  91. alias la='ls -AF'
  92. alias l='ls -CF'
  93. alias dir='ls -F --color=auto --format=vertical'
  94. alias vdir='ls -F --color=auto --format=long'
  95.  
  96. export CSCOPE_EDITOR=gvi
  97.  
  98.  
  99. # For ms-dos floppy tools I generally prefer to turn off
  100. # file globbing (evaluation of *, ? etc). You can still
  101. # use tab expansion of wildcards to effectively over-ride
  102. # this option. The same is true for find.
  103.  
  104. alias mdir='noglob mdir'
  105. alias mcopy='noglob mcopy'
  106. alias mdel='noglob mdel'
  107. alias find='noglob find'
  108.  
  109. # Program some nice completion things. First some useful
  110. # arrays:
  111.  
  112. hosts=("${(s: :)${(s: :)${${(f)$(</etc/hosts)}%%\#*}#*[ ]*}}")
  113. groups=( "${${(f)$(</etc/group)}%%:*}" )
  114.  
  115. bindkey "\e[1~" beginning-of-line
  116. bindkey "\e[H" beginning-of-line
  117. bindkey "\e[2~" transpose-words
  118. bindkey "\e[3~" delete-char
  119. bindkey "\e[4~" end-of-line
  120. bindkey "\e[F" end-of-line
  121.  
  122. # see if ssh-agent has been run; if not, run it
  123. if [ ! -S $SSH_AUTH_SOCK ]; then
  124. ssh-agent -a $SSH_AUTH_SOCK > /dev/null
  125. fi
  126. export LC_CTYPE=en_AU.UTF-8
  127. export LANG=en_AU.UTF-8
  128.  
  129. function proxy_on() {
  130. export no_proxy="localhost,127.0.0.1,localaddress,.localdomain.com"
  131.  
  132. if (( $# > 0 )); then
  133. valid=$(echo $@ | sed -n 's/\([0-9]\{1,3\}.\?\)\{4\}:\([0-9]\+\)/&/p')
  134. if [[ $valid != $@ ]]; then
  135. >&2 echo "Invalid address"
  136. return 1
  137. fi
  138. local proxy=$1
  139. export http_proxy="$proxy" \
  140. https_proxy=$proxy \
  141. ftp_proxy=$proxy \
  142. rsync_proxy=$proxy
  143. echo "Proxy environment variable set."
  144. return 0
  145. fi
  146.  
  147. #echo -n "username: "; read username
  148. #if [[ $username != "" ]]; then
  149. # echo -n "password: "
  150. # read -es password
  151. # local pre="$username:$password@"
  152. #fi
  153.  
  154. #echo -n "server: "; read server
  155. #echo -n "port: "; read port
  156.  
  157. #local proxy=$pre$server:$port
  158. local proxy="http://172.16.54.139:9090"
  159. export http_proxy="$proxy" \
  160. https_proxy=$proxy \
  161. ftp_proxy=$proxy \
  162. rsync_proxy=$proxy \
  163. HTTP_PROXY=$proxy \
  164. HTTPS_PROXY=$proxy \
  165. FTP_PROXY=$proxy \
  166. RSYNC_PROXY=$proxy
  167. }
  168.  
  169. function proxy_off(){
  170. unset http_proxy https_proxy ftp_proxy rsync_proxy \
  171. HTTP_PROXY HTTPS_PROXY FTP_PROXY RSYNC_PROXY
  172. echo -e "Proxy environment variable removed."
  173. }
  174.  
  175.  
  176. # added by Pew
  177. source "$(pew shell_config)"
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement