-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy path.zshrc
executable file
·82 lines (66 loc) · 1.63 KB
/
.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
76
77
78
79
80
81
82
# UNIVERSAL
#
if [ -e /usr/bin/uname ]
then
export OS_TYPE=$(/usr/bin/uname -s)
else
export OS_TYPE=$(/bin/uname -s)
fi
export MANPATH=~/Local/man:$(MANPATH= manpath)
export EDITOR='emacs'
export HISTSIZE=2000
export HISTFILE=~/.zsh_history
export SAVEHIST=2000
export READNULLCMD=less
export TERM=xterm-256color
export GIT_CONFIG_NOSYSTEM=1
export VIRTUAL_ENV_DISABLE_PROMPT=1
# C-x C-e to edit command line with $EDITOR
#
autoload edit-command-line
zle -N edit-command-line
bindkey '^X^e' edit-command-line
# Set prompt
#
autoload -Uz vcs_info
zstyle ':vcs_info:*' actionformats '%s:%b|%a '
zstyle ':vcs_info:*' formats '%s:%b '
precmd () { vcs_info }
setopt PROMPT_SUBST
PS1="%F{red}$OS_TYPE:zsh%f %F{blue}%3~ %F{green}\${vcs_info_msg_0_}%f%(?,:%),:() "
# Instead of running the last command launch R statistics environment.
#
alias r='command r'
# Makes git tab completion faster
#
__git_files () {
_wanted files expl 'local files' _files
}
. ~/.config/shell/last_agent.sh
function tabname() {
echo -n "\033]0;$*\007"
}
if [[ $OS_TYPE == Darwin ]]
then
export PATH=~/Local/bin:/opt/homebrew/bin:/usr/local/bin:/usr/bin:/bin:/sbin:/usr/sbin:/usr/X11/bin
pman() {
psfile=$(mktemp)
man -t "$@" | pstopdf -i -o $psfile
mv $psfile ${psfile}.pdf
open -a /System/Applications/Preview.app ${psfile}.pdf
}
elif [[ $OS_TYPE == Linux ]]
then
export PATH=~/Local/bin:/usr/local/bin:/usr/bin:/bin:/sbin:/usr/sbin:/usr/X11/bin
# send ps file to stdout
#
pman() {
man -t "$@"
}
else
echo "unrecognized OS:" $OS_TYPE
fi
if [ -e ~/.shell.local ]
then
. ~/.shell.local
fi