66# Twitter: @Watasuke102
7788#
9+ # Yamada Hayao
10+ # Twitter: @Hayao0819
11+ 12+ #
913# (c) 2020 Fascode Network.
1014
1115
12- # Completion
16+ # -- Alias --#
17+ [[ -f .aliases ]] && source .aliases
18+
19+
20+ # -- Completion --#
1321[ -e /usr/local/share/zsh-completions ] && fpath=(/usr/local/share/zsh-completions $fpath )
1422autoload -U compinit
1523compinit -u
1624
1725
18- # Archive settings
26+ # -- Archive settings --#
1927export ZIPINFOOPT=-OCP932
2028export UNZIPOPT=-OCP932
2129
2230
23- # Key
31+ # -- Like fish prompt --#
32+ source /usr/share/zsh/plugins/zsh-autosuggestions/zsh-autosuggestions.zsh
33+ source /usr/share/zsh/plugins/zsh-syntax-highlighting/zsh-syntax-highlighting.zsh
34+ source /usr/share/zsh/plugins/zsh-history-substring-search/zsh-history-substring-search.zsh
35+
36+
37+ # -- Key --#
2438# create a zkbd compatible hash;
2539# to add other keys to this hash, see: man 5 terminfo
2640typeset -A key
@@ -42,13 +56,17 @@ key[PageDown]=${terminfo[knp]}
4256[[ -n " ${key[End]} " ]] && bindkey " ${key[End]} " end-of-line
4357[[ -n " ${key[Insert]} " ]] && bindkey " ${key[Insert]} " overwrite-mode
4458[[ -n " ${key[Delete]} " ]] && bindkey " ${key[Delete]} " delete-char
45- [[ -n " ${key[Up]} " ]] && bindkey " ${key[Up]} " up-line-or-history
46- [[ -n " ${key[Down]} " ]] && bindkey " ${key[Down]} " down-line-or-history
59+ [[ -n " ${key[Up]} " ]] && bindkey " ${key[Up]} " history-substring-search-up
60+ [[ -n " ${key[Down]} " ]] && bindkey " ${key[Down]} " history-substring-search-down
4761[[ -n " ${key[Left]} " ]] && bindkey " ${key[Left]} " backward-char
4862[[ -n " ${key[Right]} " ]] && bindkey " ${key[Right]} " forward-char
4963[[ -n " ${key[PageUp]} " ]] && bindkey " ${key[PageUp]} " beginning-of-buffer-or-history
5064[[ -n " ${key[PageDown]} " ]] && bindkey " ${key[PageDown]} " end-of-buffer-or-history
5165
66+ # Normal history display
67+ # [[ -n "${key[Up]}" ]] && bindkey "${key[Up]}" up-line-or-history
68+ # [[ -n "${key[Down]}" ]] && bindkey "${key[Down]}" down-line-or-history
69+
5270# Finally, make sure the terminal is in application mode, when zle is
5371# active. Only then are the values from $terminfo valid.
5472if (( ${+terminfo[smkx]} )) && (( ${+terminfo[rmkx]} )) ; then
@@ -63,28 +81,28 @@ if (( ${+terminfo[smkx]} )) && (( ${+terminfo[rmkx]} )); then
6381fi
6482
6583
66- # Do not sound
84+ # -- Do not sound --#
6785setopt nolistbeep
6886setopt nolistbeep
6987
7088
71- # Save history.
89+ # -- Save history. --#
7290HISTFILE=~ /.zsh_history
7391HISTSIZE=100000
7492SAVEHIST=100000
7593setopt share_history
7694
7795
78- # Make colors available
96+ # -- Make colors available --#
7997autoload -Uz colors
8098colors
8199
82100
83- # Pass to the path
101+ # -- Pass to the path --#
84102[[ -d ~ /.bin ]] && export PATH=" ~/.bin:${PATH} "
85103
86104
87- # PROMPT
105+ # -- PROMPT --#
88106if [[ ${TERM} = " linux" ]]; then
89107 PROMPT=' %B%F{red}%(?..%? )%f%b%B%F{red}%n%f%b@%m %B%40<..<%~%<< %b%# '
90108else
@@ -103,13 +121,3 @@ else
103121
104122 install_powerline_precmd
105123fi
106-
107- # Like fish prompt
108- source /usr/share/zsh/plugins/zsh-autosuggestions/zsh-autosuggestions.zsh
109- source /usr/share/zsh/plugins/zsh-syntax-highlighting/zsh-syntax-highlighting.zsh
110-
111- # Alias
112- [[ -f .aliases ]] && source .aliases
113-
114- # Set default terminal
115- export TERMINAL=/usr/bin/sakura
0 commit comments