-
Notifications
You must be signed in to change notification settings - Fork 0
/
.zshrc
57 lines (51 loc) · 1.45 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
# Lines configured by zsh-newuser-install
HISTFILE=~/.histfile
HISTSIZE=1000
SAVEHIST=1000
# global history
set INC_APPEND_HISTORY
unsetopt beep
bindkey -e
setopt noflowcontrol
# global history
setopt INC_APPEND_HISTORY
stty -ixon
# End of lines configured by zsh-newuser-install
# The following lines were added by compinstall
zstyle :compinstall filename '/home/mspieren/.zshrc'
autoload -Uz compinit
compinit
# End of lines added by compinstall
# Manuel Spierenburg configured
# open new terminal in same directory
[[ -f "${HOME}/.cwd" ]] && cd "$(< ${HOME}/.cwd)"
# set terminal title
precmd() { eval "$PROMPT_COMMAND" ; echo "$PWD" > ~/.cwd }
PROMPT_COMMAND='echo -ne "\033]0;${USER}@${HOST}:${PWD}\007"'
#source ~/.zsh/colors.zsh
source ~/.zsh/exports.zsh
source ~/.zsh/aliases.zsh
source ~/.zsh/prompt.zsh
source ~/.zsh/functions.zsh
# activate virtualenv
function chpwd() {
echo "$PWD" > ${HOME}/.cwd
if [ -z "$VIRTUAL_ENV" ] ; then
if [ -f ".venv" ] ; then
VENV=$(cat .venv)
echo "activate global virtualenv ${VENV}"
source "${HOME}/.venvs/${VENV}/bin/activate"
# source $(cat .venv)
elif [ -d ".venv" ] ; then
echo "activate virtualenv"
source .venv/bin/activate
fi
fi
# elif [ -f "Pipfile" ] ; then
# # check if not activated yet
# if [ -z "$VIRTUAL_ENV" ] ; then
# precmd()
# pipenv shell
# fi
# fi
}