Przeglądaj źródła

remove unnecessary prompt color setting and update proxy script for zsh

Weiyi Lou 13 lat temu
rodzic
commit
1d7a72eb93

+ 1 - 1
zsh/oh-my-zsh-custom/cinaeco.zsh-theme

@@ -24,7 +24,7 @@ print -Pn "\e]1;`hostname | cut -d. -f1`\a"
 ## multi line prompt
 PROMPT='
 %{$fg[cyan]%}[%m]  %{$fg[yellow]%}%3~  $(git_prompt_info) 
-%{$fg[magenta]%}%n %{$fg[magenta]%}→ %{$reset_color%}'
+%{$fg[magenta]%}%n → %{$reset_color%}'
 RPROMPT='$(vi_mode_prompt_info) %{$reset_color%}%T %{$fg[white]%}%h%{$reset_color%}'
 
 MODE_INDICATOR="%{$fg[green]%}vi-mode%{$reset_color%}"

+ 5 - 2
zsh/oh-my-zsh-custom/proxy.zsh

@@ -7,6 +7,9 @@ alias proxy='export http_proxy=http://192.168.1.248:3128;export HTTP_PROXY=$http
 alias noproxy='export http_proxy='';export HTTP_PROXY=$http_proxy;export https_proxy=$http_proxy;export HTTPS_PROXY=$http_proxy;export ftp_proxy=$http_proxy;export FTP_PROXY=$http_proxy;'
 
 # run only if I am at work
-if [ `ifconfig | grep -P '(10.10.0.|192.168.2)' | wc -l` = 1 ]; then
-  proxy
+if [ `ifconfig | grep 10.10.0 | wc -l` = 1 ]; then
+    proxy
+fi
+if [ `ifconfig | grep 192.168.2 | wc -l` = 1 ]; then
+    proxy
 fi