Created
April 7, 2017 02:55
-
-
Save zhaorui/ec553872170eb875004d75b42a9dcbf1 to your computer and use it in GitHub Desktop.
My fish config
This file contains 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
# Path to Oh My Fish install. | |
set -q XDG_DATA_HOME | |
and set -gx OMF_PATH "$XDG_DATA_HOME/omf" | |
or set -gx OMF_PATH "$HOME/.local/share/omf" | |
# Load Oh My Fish configuration. | |
source $OMF_PATH/init.fish | |
set -x PATH $PATH ~/GitRepo/depot_tools | |
set -x PATH $PATH ~/.cargo/bin | |
set -x http_proxy | |
set -x https_proxy | |
# Use colors, but only if connected to a terminal, and that terminal | |
# supports them. | |
if which tput >/dev/null 2>&1 | |
set ncolors (tput colors) | |
end | |
if [ -t 1 ]; and [ -n "$ncolors" ]; and [ "$ncolors" -ge 8 ] | |
set RED (tput setaf 1) | |
set GREEN (tput setaf 2) | |
set YELLOW (tput setaf 3) | |
set BLUE (tput setaf 4) | |
set BOLD (tput bold) | |
set NORMAL (tput sgr0) | |
else | |
set RED "" | |
set GREEN "" | |
set YELLOW "" | |
set BLUE "" | |
set BOLD "" | |
set NORMAL "" | |
end | |
function enable_tunnel | |
nohup ssh -L 9001:gitlabapp.115rc.com:80 zhaorui@zhaoruis-iMac.local -f -N > /dev/null | |
end | |
function fish_prompt | |
if [ $status -eq 0 ] | |
printf $GREEN"fish➤ "$NORMAL | |
else | |
printf $RED"fish➤ "$NORMAL | |
end | |
return 0 | |
end | |
git config --global --unset http.proxy | |
git config --global --unset https.proxy | |
function enable_http_proxy | |
set -x -g http_proxy "127.0.0.1:51773" | |
set -x -g https_proxy "127.0.0.1:51773" | |
git config --global http.proxy "http://127.0.0.1:51773" | |
git config --global https.proxy "http://127.0.0.1:51773" | |
end | |
#use code to open BUILD.gn for this folder | |
function codegn | |
set saved_folder (pwd) | |
while test (pwd) != "/" | |
if test -f BUILD.gn | |
code BUILD.gn | |
break | |
else | |
cd .. | |
end | |
end | |
cd $saved_folder | |
end | |
function build | |
set saved_folder (pwd) | |
rm -rf ~/115chrome/src/out/Release/115Browser.app | |
rm -rf ~/115chrome/src/out/Release/115Browser\ Framework.framework | |
vim ~/115chrome/src/chrome/VERSION | |
cd ~/115chrome/src | |
ninja -C out/Release chrome | |
cd ~/115chrome/src/115chrome/mac/codesign | |
./sign.py | |
cd $saved_folder | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment