Created
August 23, 2016 10:22
-
-
Save aki237/7fbabd5fa714bc4dc2912ca52b185698 to your computer and use it in GitHub Desktop.
My new bashrc
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
export http_proxy="http://127.0.0.1:9999" | |
export https_proxy="http://127.0.0.1:9999" | |
export GOPATH=$HOME/gospace | |
export GOROOT=/usr/local/go | |
export PATH=$PATH:$HOME/.local/bin:$GOPATH/bin:$HOME/bin:$GOROOT/bin:$HOME/.cargo/bin | |
export RUST_SRC_PATH=$HOME/.cargo/src/rustc-1.11.0/src | |
RED="\[$(tput setaf 9)\]" | |
GREEN="\[$(tput setaf 12)\]" | |
RESET="\[$(tput sgr0)\]" | |
############################## | |
#######My Init Function####### | |
############################## | |
function gospace(){ | |
cd ~/gospace/src/github.com/aki237/ | |
} | |
function unset_proxy() { | |
unset http_proxy | |
unset HTTP_PROXY | |
unset https_proxy | |
unset HTTPS_PROXY | |
unset all_proxy | |
unset ALL_PROXY | |
} | |
function init_my_bash() { | |
bind '"\es":"\C-asudo \C-e"' | |
bind '"\ed":"\C-adict \C-e\n"' | |
bind '"\ez":"\C-aproxychains4 \C-e"' | |
bind '"\ep":"\C-e\C-hping 10.1.1.11\n"' | |
bind '"\ek":"\C-e\C-u"' | |
bind '"\e[3;5~":"\ed"' | |
bind '"\C-h":"\C-w"' | |
bind '"\e[1;5C":"\ef"' | |
bind '"\e[1;5D":"\eb"' | |
bind '"\e[1;3C":"cd -\n"' | |
bind '"\e[1;3D":"..\n"' | |
shopt -s cdspell | |
shopt -s autocd | |
} | |
function git_branch() { | |
if [ -d "$PWD/.git" ] | |
then | |
echo `git branch | grep -e "*" | sed "s/^*\ //g"`; | |
fi | |
} | |
function eb() { | |
emacs -nw ~/.bashrc; | |
source ~/.bashrc; | |
} | |
function progychanger(){ | |
emacs -nw ~/.progy | |
sudo systemctl restart proGY.service | |
} | |
function em(){ | |
emacs $@ & | |
} | |
export PS1="\[\033[1;31m\]\W ${GREEN}\$(git_branch)${RED}${RESET}" | |
#source $HOME/.config/goto/gob_completion.bash | |
#source $HOME/.config/goto/goto | |
#source $HOME/.config/goto/goto_completion.bash | |
source /usr/share/bash-completion/bash_completion | |
init_my_bash | |
alias ls="ls --color" | |
#source /etc/profile.d/vte.sh | |
export EDITOR="emacs -nw" | |
#xinput set-prop 13 "Synaptics Scrolling Distance" -50 -50 | |
alias la="ls -a" | |
alias ll="ls -h" | |
source /etc/profile.d/vte.sh |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment