forked from lqueryvg/dotfiles
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.my_zshrc
81 lines (66 loc) · 1.93 KB
/
.my_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
# Keeping my zshrc settings separate from oh-my-zsh
echo .my_zshrc start
source ~/dotfiles/my_functions.sh
powerline=~/mygit/powerline-shell/powerline-shell.py
if [[ -f ~/homebrew/share/liquidprompt ]]
then
[[ $- = *i* ]] && source ~/homebrew/share/liquidprompt
elif [[ -x $powerline ]]
then
function _update_ps1() {
PS1="$($powerline \
--cwd-max-depth 2 \
--mode compatible \
$? 2> /dev/null)"
#--mode flat \
}
if [ "$TERM" != "linux" ]; then
PROMPT_COMMAND="_update_ps1; $PROMPT_COMMAND"
fi
else
PS1=$(whoami)"$ "
fi
if [[ -f ~/mygit/zsh-git-prompt/zshrc.sh ]]
then
source ~/mygit/zsh-git-prompt/zshrc.sh
PROMPT='$(basename $(pwd))$(git_super_status)/ '
else
;
fi
[[ -z $PROMPT ]] && PROMPT='$(whoami)$ '
export SHELL=/bin/zsh
HISTFILE=~/.histfile
HISTSIZE=1000
SAVEHIST=1000
setopt interactivecomments
setopt inc_append_history
#setopt share_history
bindkey -v
#zstyle :compinstall filename '/Users/jbu46/.zshrc'
#autoload -Uz compinit
#compinit
zstyle ':completion:*' completer _complete
zstyle ':completion:*' matcher-list '' 'm:{[:lower:][:upper:]}={[:upper:][:lower:]}' '+l:|=* r:|=*'
autoload -Uz compinit
compinit
if [[ $(uname) == "Linux" ]]
then
# make keys behave sensibly
bindkey "^[OH" vi-beginning-of-line # Home
bindkey "^[OF" vi-end-of-line # End
bindkey "^[[3~" delete-char # Delete
bindkey "^[[2~" beep # Insert (make passive)
fi
alias -g pg=' | grep --color'
# I don't use vi-mode because it messes with my PageUp key.
# But without it, I need to configure 'v' to enter full screen editor
# when editing command line, as follows...
export VISUAL=vim
autoload edit-command-line; zle -N edit-command-line
bindkey -M vicmd v edit-command-line
# use grid selection for completion
zstyle ':completion:*' menu select
source_if_exists "${HOME}/.my_profile.sh"
if [[ $- == *i* ]];then
echo "$( basename $0 ) loaded"
fi