-
Notifications
You must be signed in to change notification settings - Fork 0
/
desktop_zshrc
75 lines (57 loc) · 1.79 KB
/
desktop_zshrc
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
export BRAZIL_WORKSPACE_DEFAULT_LAYOUT=short
export AUTO_TITLE_SCREENS="NO"
# export PROMPT="
# %{$fg[white]%}(%D %*) <%?> [%~] $program %{$fg[default]%}
# %{$fg[cyan]%}%m %#%{$fg[default]%} "
# export RPROMPT=
set-title() {
echo -e "\e]0;$*\007"
}
ssh() {
set-title $*;
/usr/bin/ssh -2 $*;
set-title $HOST;
}
alias e=emacs
alias bb=brazil-build
alias bba='brazil-build apollo-pkg'
alias bre='brazil-runtime-exec'
alias brc='brazil-recursive-cmd'
alias bws='brazil ws'
alias bwsuse='bws use --gitMode -p'
alias bwscreate='bws create -n'
alias brc=brazil-recursive-cmd
alias bbr='brc brazil-build'
alias bball='brc --allPackages'
alias bbb='brc --allPackages brazil-build'
alias bbra='bbr apollo-pkg'
alias l='ls -ahl'
alias gs='git status'
# AWS authorization
alias auth='kinit -f && mwinit -o'
export PATH=$HOME/.toolbox/bin:$PATH
export PATH=$HOME/.rbenv/bin:$PATH
export BRAZIL_WORKSPACE_DEFAULT_LAYOUT=short
export AUTO_TITLE_SCREENS="NO"
export PATH=/apollo/env/envImprovement/bin:$PATH
eval "$(rbenv init -)"
source /home/zhengnlu/project/zsh-syntax-highlighting/zsh-syntax-highlighting.zsh
ZSH_AUTOSUGGEST_HIGHLIGHT_STYLE="fg=#ff00ff,bg=cyan,bold,underline"
ZSH_AUTOSUGGEST_STRATEGY=(history completion)
source ~/.zsh/zsh-autosuggestions/zsh-autosuggestions.zsh
# Show git branch name
function parse_git_branch() {
git branch 2> /dev/null | sed -n -e 's/^\* \(.*\)/[\1]/p'
}
COLOR_DEF=$'\e[0m'
COLOR_USR=$'\e[38;5;243m'
COLOR_DIR=$'\e[38;5;197m'
COLOR_GIT=$'\e[38;5;39m'
setopt PROMPT_SUBST
export PROMPT='$ ${COLOR_DIR}%~ ${COLOR_GIT}$(parse_git_branch)${COLOR_DEF} $ '
# export PROMPT="
# %{$fg[white]%}(%D %*) <%?> [%~] $program %{$fg[default]%} %{$(parse_git_branch)
# %{$fg[cyan]%}%m %#%{$fg[default]%} "
export RPROMPT=
# display timestamp for each command
RPROMPT='[%D{%L:%M:%S %p}]'