-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy path.zshrc
executable file
·95 lines (93 loc) · 1.97 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
83
84
85
86
87
88
89
90
91
92
93
94
95
# Confg file for ZedShell
# Wrote by some dotfiles others peoples
# Author Alexander Simonov <[email protected]>, Dmitry Shaposhnik <[email protected]>
umask 022
#
# Clean paths
#
export PATH=""
export MANPATH=""
ZSH_MYCONFDIR=~/.zsh
#
# Locale
#
export LANG="en_US.UTF-8"
export LC_ALL="en_US.UTF-8"
export LC_CTYPE="en_US.UTF-8"
export COLORFGBG="default;default"
#
# Load options
#
source $ZSH_MYCONFDIR/options.zsh
# Use hard limits, except for a smaller stack and no core dumps
unlimit
limit stack 8192
limit core 0
limit -s
SAVEHIST=5000
HISTSIZE=5000
DIRSTACKSIZE=20
# We use the same history file like bash
HISTFILE=~/.bash_history
# Autoload zsh modules when they are referenced
zmodload -a zsh/stat stat
zmodload -a zsh/zpty zpty
zmodload -a zsh/zprof zprof
zmodload -ap zsh/mapfile mapfile
#
# Functions
#
source $ZSH_MYCONFDIR/functions.zsh
#
# Mostly all Linux distributions used /etc/profile.d dir
# for collecting path info
#
load_files "/etc/prodile.d" "sh"
#
# Make PATH from /etc/path(.d)?
#
PATH=`read_path_dir /etc/paths "$PATH"`
MANPATH=`read_path_dir /etc/manpaths "$MANPATH"`
export MANPATH
#
# Scan path dir for new path
#
PATH_SCAN_DIR=$ZSH_MYCONFDIR/path
export PATH=`read_path_dir $PATH_SCAN_DIR "$PATH" .path`
load_files "$PATH_SCAN_DIR.d" ".zsh"
export EDITOR=vim
export PAGER=less
export UNAME_S=$(uname -s 2>&1 || echo "Linux" )
#
# Load aliases
#
source $ZSH_MYCONFDIR/aliases.zsh
#
# Load completion
#
fpath=($ZSH_MYCONFDIR/function.d $fpath)
source $ZSH_MYCONFDIR/completion.zsh
#
# Load binds
#
source $ZSH_MYCONFDIR/keybind.zsh
export PKG_MANAGER=none
for i in {port,fink,brew};do
`which $i > /dev/null` && export PKG_MANAGER=$i
done
#
# Load modules
#
load_files "$ZSH_MYCONFDIR/modules.d" ".zsh"
#
# Load prompt
#
if [[ -f $ZSH_MYCONFDIR/prompt.zsh ]]; then
source $ZSH_MYCONFDIR/prompt.zsh
else
prompts=($ZSH_MYCONFDIR/prompt.d/*)
source $prompts[1]
fi
# RVM
[[ -s $HOME/.rvm/scripts/rvm ]] && source $HOME/.rvm/scripts/rvm
# vim: set noet ts=4 tw=80 :