forked from lbesnard/dotfiles
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathzshrc.zgen.ssh
76 lines (62 loc) · 2.19 KB
/
zshrc.zgen.ssh
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
# Set up the prompt
export TERM="xterm-256color"
export PATH="$HOME/.linuxbrew/bin:$PATH"
export MANPATH="/home/lbesnard/.linuxbrew/share/man:$MANPATH"
export INFOPATH="/home/lbesnard/.linuxbrew/share/info:$INFOPATH"
export SHELL=$HOME/.linuxbrew/bin/zsh
setopt nosharehistory
[ -f $HOME/.env ] && source $HOME/.env
[ -f $HOME/.alias ] && source $HOME/.alias
source /etc/profile.d/* # especially useful for remote connection
zgen_zsh=$HOME/.zgen/zgen.zsh
if [ ! -f $zgen_zsh ]; then
echo "Installing zgen..."
echo ""
mkdir -p ~/.zgen;
curl https://raw.githubusercontent.com/tarjoilija/zgen/master/zgen.zsh > $HOME/.zgen/zgen.zsh;
fi
source $zgen_zsh
# change the size of history files
export HISTSIZE=32768;
export HISTFILESIZE=$HISTSIZE;
_cmpl_inputlog() {
reply=($(ls -d $ERROR_DIR/* | sed 's@.*/@@'))
reply=($(echo $reply | tr -s " " "\012"))
}
compctl -K _cmpl_inputlog input_logf
compctl -K _cmpl_inputlog input_log
if ! zgen saved; then
echo "Creating a zgen save"
zgen oh-my-zsh
zgen oh-my-zsh plugins/command-not-found
zgen oh-my-zsh plugins/gitfast
zgen oh-my-zsh plugins/sudo
zgen oh-my-zsh plugins/common-aliases
zgen oh-my-zsh plugins/autojump
zgen oh-my-zsh plugins/sublime
zgen load zsh-users/zsh-completions
## Syntax highlighting bundle.
zgen load zsh-users/zsh-syntax-highlighting
zgen loadall <<EOPLUGINS zsh-users/zsh-history-substring-search ./zsh-history-substring-search.zsh
EOPLUGINS
zgen oh-my-zsh plugins/web-search
zgen oh-my-zsh plugins/vagrant
zgen load zsh-users/zsh-autosuggestions
# Load the theme.
zgen load caiogondim/bullet-train-oh-my-zsh-theme bullet-train
zgen save
fi
bindkey "\033[1~" beginning-of-line
bindkey "\033[4~" end-of-line
# highlight options
export LSCOLORS=ExfxcxdxbxGxDxabagacad
zstyle ':completion:*' list-colors ${LSCOLORS}
zstyle ':completion:*:default' menu select=2
if [ ! -z ${SSH_TTY} ]; then
source $DATA_SERVICES_DIR/profile.d/util.sh &>/dev/null;
source $DATA_SERVICES_DIR/profile.d/input.sh &>/dev/null;
compinit $DATA_SERVICES_DIR/profile.d/*;
fi
if command -v tmux > /dev/null; then
[[ ! $TERM =~ screen ]] && [ -z $TMUX ] && exec tmux -2 attach;
fi