-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathzshrc
executable file
·65 lines (60 loc) · 2.18 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
# _ _ ___
# | || | __| H
# | __ | _| A
# |_||_|___| P
#
#
# plugins {{{
# syntax highlighting
#source /usr/share/zsh-syntax-highlighting/zsh-syntax-highlighting.zsh
#source /usr/share/zsh-autosuggestions/zsh-autosuggestions.zsh
#source /usr/share/zsh/plugins/zsh-history-substring-search/zsh-history-substring-search.zsh
# }}}
# disable duplicated command in zsh_history {{{
setopt histignorealldups
# }}}
#source /usr/share/powerline/bindings/zsh/powerline.zsh
# history file {{{
export HISTFILE=~/.zsh.d/histfile
export HISTSIZE=4096 # the number of items for the internal history list
export SAVEHIST=1000000 # maximum number of items for the history file
# The meaning of these options can be found in man page of `zshoptions`.
setopt HIST_IGNORE_ALL_DUPS # do not put duplicated command into history list
setopt HIST_SAVE_NO_DUPS # do not save duplicated command
setopt HIST_REDUCE_BLANKS # remove unnecessary blanks
setopt INC_APPEND_HISTORY_TIME # append command to history file immediately after execution
setopt EXTENDED_HISTORY # record command start time
# }}}
# NOTE THAT these two scripts must be called with parameters.
source ~/.zsh.d/powermore.zsh # Script with prompt, disable hardcoded colors.
source ~/.zsh.d/utilities.zsh false # Optional scripts (see above), enable dirstack tweaks.
# source aliases file {{{
source ~/.zsh.d/aliases.zsh
# }}}
## zsh prompt {{{
#PROMPT=" %(?.♠.%F{red}♥%f) %(?.♣.%F{red}♦%f) %F{magenta}%.%f "
#RPROMPT="%F{green}${vcs_info_msg_0_}%f"
#
#PROMPT=" %(?.♠.%F{red}♥) %F{magenta}%.%f %F{blue}%B→%b "
#RPROMPT="%F{green}${vcs_info_msg_0_}%f%F{red}%(?..%F{red} %?)%f"
#
#PROMPT=" %(?.♠.%F{red}♥) %F{magenta}%. %(?..%F{red}%? )%F{blue}⇒ "
#PROMPT=" %(?.♠.%F{red}♥) %F{magenta}%. %F{blue}%B⇒%b "
#RPROMPT="$(echo -n ${vcs_info_msg_0_}%f)"
#RPROMPT=" %1~ %F{red}${vcs_info_msg_0_}%f %# "
#RPROMPT='%(?..%F{red}%?)'
#RPROMPT='%{%F{$1}%K{$2}%} $last_code $rc'
## }}}
# auto correction {{{
setopt CORRECT
setopt CORRECT_ALL
# }}}
# auto completion {{{
autoload -Uz compinit && compinit
# }}}
# autostart commands {{{
date
#[ $[ $RANDOM % 4 ] == 0 ] && neofetch || pfetch
#fm6000 -n -r -c random
#fm4000 -n -r -c white
## }}}