22[[ $- != * i* ]] && return
33
44alias ls=' ls --color=auto'
5+ alias ll=' ls --color=auto -lah'
6+ alias grep=' grep -n --color'
57PS1=' [\u@\h \W]\$ '
68
79# Autosuggestions
810source /usr/share/zsh/plugins/zsh-autosuggestions/zsh-autosuggestions.zsh
911
1012# synatx-highlighting
1113source /usr/share/zsh/plugins/fast-syntax-highlighting/fast-syntax-highlighting.plugin.zsh
12- # source /usr/share/zsh/plugins/zsh-syntax-highlighting/zsh-syntax-highlighting.zsh
13-
1414
1515# Display ISO version and distribution information in short
1616alias version=" sed -n 1p /etc/os-release && sed -n 7p /etc/os-release && sed -n 8p /etc/os-release"
@@ -28,14 +28,9 @@ alias unlock="sudo rm /var/lib/pacman/db.lck"
2828alias remove=" sudo pacman -R"
2929alias autoremove=" sudo pacman -Rns"
3030
31- # Fix keyring and gnupg mount isuue
31+ # Fix keyring and gnupg mount isuue
3232alias fix-keys=" sudo rm -rvf /etc/pacman.d/gnupg && sudo pacman-key --init && sudo pacman-key --populate"
3333
34- # keyboard ctrl+arrow key issue solved
35- # bindkey '^[[1;5C' forward-word # Ctrl+Right arrow
36- # bindkey '^[[1;5D' backward-word # Ctrl+Left arrow
37-
38-
3934# # Path section
4035# Set $PATH if ~/.local/bin exist
4136if [ -d " $HOME /.local/bin" ]; then
@@ -51,7 +46,6 @@ precmd_functions+=(set_win_title)
5146# # Plugins section: Enable fish style features
5247# Use syntax highlighting
5348source /usr/share/zsh/plugins/fast-syntax-highlighting/fast-syntax-highlighting.plugin.zsh
54- # source /usr/share/zsh/plugins/zsh-syntax-highlighting/zsh-syntax-highlighting.zsh
5549
5650# Use autosuggestion
5751source /usr/share/zsh/plugins/zsh-autosuggestions/zsh-autosuggestions.zsh
@@ -70,7 +64,6 @@ source /usr/share/fzf/completion.zsh
7064# Advanced command-not-found hook
7165[[ -e /usr/share/doc/find-the-command/ftc.zsh ]] && source /usr/share/doc/find-the-command/ftc.zsh
7266
73-
7467# # Options section
7568setopt correct # Auto correct mistakes
7669setopt extendedglob # Extended globbing. Allows using regular expressions with *
@@ -90,7 +83,7 @@ setopt pushdminus
9083autoload -Uz compinit
9184compinit
9285zstyle ' :completion:*' matcher-list ' m:{a-zA-Z}={A-Za-z}' # Case insensitive tab completion
93- zstyle ' :completion:*' rehash true # automatically find new executables in path
86+ zstyle ' :completion:*' rehash true # automatically find new executables in path
9487zstyle ' :completion:*' list-colors " ${(s.: .)LS_COLORS} " # Colored completion (different colors for dirs/files/etc)
9588zstyle ' :completion:*' completer _expand _complete _ignored _approximate
9689zstyle ' :completion:*' menu select
@@ -109,66 +102,64 @@ HISTFILE=~/.zhistory
109102HISTSIZE=50000
110103SAVEHIST=10000
111104
112-
113105# # Keys
114106# Use emacs key bindings
115107bindkey -e
116108
117109# Ctrl+ backspace delets the word
118-
119110bindkey ' ^H' backward-kill-word
120111bindkey ' 5~' kill-word
121112
122113# [PageUp] - Up a line of history
123114if [[ -n " ${terminfo[kpp]} " ]]; then
124- bindkey -M emacs " ${terminfo[kpp]} " up-line-or-history
125- bindkey -M viins " ${terminfo[kpp]} " up-line-or-history
126- bindkey -M vicmd " ${terminfo[kpp]} " up-line-or-history
115+ bindkey -M emacs " ${terminfo[kpp]} " up-line-or-history
116+ bindkey -M viins " ${terminfo[kpp]} " up-line-or-history
117+ bindkey -M vicmd " ${terminfo[kpp]} " up-line-or-history
127118fi
128119# [PageDown] - Down a line of history
129120if [[ -n " ${terminfo[knp]} " ]]; then
130- bindkey -M emacs " ${terminfo[knp]} " down-line-or-history
131- bindkey -M viins " ${terminfo[knp]} " down-line-or-history
132- bindkey -M vicmd " ${terminfo[knp]} " down-line-or-history
121+ bindkey -M emacs " ${terminfo[knp]} " down-line-or-history
122+ bindkey -M viins " ${terminfo[knp]} " down-line-or-history
123+ bindkey -M vicmd " ${terminfo[knp]} " down-line-or-history
133124fi
134125
135126# Start typing + [Up-Arrow] - fuzzy find history forward
136127if [[ -n " ${terminfo[kcuu1]} " ]]; then
137- autoload -U up-line-or-beginning-search
138- zle -N up-line-or-beginning-search
128+ autoload -U up-line-or-beginning-search
129+ zle -N up-line-or-beginning-search
139130
140- bindkey -M emacs " ${terminfo[kcuu1]} " up-line-or-beginning-search
141- bindkey -M viins " ${terminfo[kcuu1]} " up-line-or-beginning-search
142- bindkey -M vicmd " ${terminfo[kcuu1]} " up-line-or-beginning-search
131+ bindkey -M emacs " ${terminfo[kcuu1]} " up-line-or-beginning-search
132+ bindkey -M viins " ${terminfo[kcuu1]} " up-line-or-beginning-search
133+ bindkey -M vicmd " ${terminfo[kcuu1]} " up-line-or-beginning-search
143134fi
144135# Start typing + [Down-Arrow] - fuzzy find history backward
145136if [[ -n " ${terminfo[kcud1]} " ]]; then
146- autoload -U down-line-or-beginning-search
147- zle -N down-line-or-beginning-search
137+ autoload -U down-line-or-beginning-search
138+ zle -N down-line-or-beginning-search
148139
149- bindkey -M emacs " ${terminfo[kcud1]} " down-line-or-beginning-search
150- bindkey -M viins " ${terminfo[kcud1]} " down-line-or-beginning-search
151- bindkey -M vicmd " ${terminfo[kcud1]} " down-line-or-beginning-search
140+ bindkey -M emacs " ${terminfo[kcud1]} " down-line-or-beginning-search
141+ bindkey -M viins " ${terminfo[kcud1]} " down-line-or-beginning-search
142+ bindkey -M vicmd " ${terminfo[kcud1]} " down-line-or-beginning-search
152143fi
153144
154145# [Home] - Go to beginning of line
155146if [[ -n " ${terminfo[khome]} " ]]; then
156- bindkey -M emacs " ${terminfo[khome]} " beginning-of-line
157- bindkey -M viins " ${terminfo[khome]} " beginning-of-line
158- bindkey -M vicmd " ${terminfo[khome]} " beginning-of-line
147+ bindkey -M emacs " ${terminfo[khome]} " beginning-of-line
148+ bindkey -M viins " ${terminfo[khome]} " beginning-of-line
149+ bindkey -M vicmd " ${terminfo[khome]} " beginning-of-line
159150fi
160151# [End] - Go to end of line
161152if [[ -n " ${terminfo[kend]} " ]]; then
162- bindkey -M emacs " ${terminfo[kend]} " end-of-line
163- bindkey -M viins " ${terminfo[kend]} " end-of-line
164- bindkey -M vicmd " ${terminfo[kend]} " end-of-line
153+ bindkey -M emacs " ${terminfo[kend]} " end-of-line
154+ bindkey -M viins " ${terminfo[kend]} " end-of-line
155+ bindkey -M vicmd " ${terminfo[kend]} " end-of-line
165156fi
166157
167158# [Shift-Tab] - move through the completion menu backwards
168159if [[ -n " ${terminfo[kcbt]} " ]]; then
169- bindkey -M emacs " ${terminfo[kcbt]} " reverse-menu-complete
170- bindkey -M viins " ${terminfo[kcbt]} " reverse-menu-complete
171- bindkey -M vicmd " ${terminfo[kcbt]} " reverse-menu-complete
160+ bindkey -M emacs " ${terminfo[kcbt]} " reverse-menu-complete
161+ bindkey -M viins " ${terminfo[kcbt]} " reverse-menu-complete
162+ bindkey -M vicmd " ${terminfo[kcbt]} " reverse-menu-complete
172163fi
173164
174165# [Backspace] - delete backward
@@ -177,66 +168,56 @@ bindkey -M viins '^?' backward-delete-char
177168bindkey -M vicmd ' ^?' backward-delete-char
178169# [Delete] - delete forward
179170if [[ -n " ${terminfo[kdch1]} " ]]; then
180- bindkey -M emacs " ${terminfo[kdch1]} " delete-char
181- bindkey -M viins " ${terminfo[kdch1]} " delete-char
182- bindkey -M vicmd " ${terminfo[kdch1]} " delete-char
171+ bindkey -M emacs " ${terminfo[kdch1]} " delete-char
172+ bindkey -M viins " ${terminfo[kdch1]} " delete-char
173+ bindkey -M vicmd " ${terminfo[kdch1]} " delete-char
183174else
184- bindkey -M emacs " ^[[3~" delete-char
185- bindkey -M viins " ^[[3~" delete-char
186- bindkey -M vicmd " ^[[3~" delete-char
175+ bindkey -M emacs " ^[[3~" delete-char
176+ bindkey -M viins " ^[[3~" delete-char
177+ bindkey -M vicmd " ^[[3~" delete-char
187178
188- bindkey -M emacs " ^[3;5~" delete-char
189- bindkey -M viins " ^[3;5~" delete-char
190- bindkey -M vicmd " ^[3;5~" delete-char
179+ bindkey -M emacs " ^[3;5~" delete-char
180+ bindkey -M viins " ^[3;5~" delete-char
181+ bindkey -M vicmd " ^[3;5~" delete-char
191182fi
192183
193184typeset -g -A key
194185if (( ${+terminfo[smkx]} && ${+terminfo[rmkx]} )) ; then
195- autoload -Uz add-zle-hook-widget
196- function zle_application_mode_start { echoti smkx }
197- function zle_application_mode_stop { echoti rmkx }
198- add-zle-hook-widget -Uz zle-line-init zle_application_mode_start
199- add-zle-hook-widget -Uz zle-line-finish zle_application_mode_stop
186+ autoload -Uz add-zle-hook-widget
187+ function zle_application_mode_start { echoti smkx }
188+ function zle_application_mode_stop { echoti rmkx }
189+ add-zle-hook-widget -Uz zle-line-init zle_application_mode_start
190+ add-zle-hook-widget -Uz zle-line-finish zle_application_mode_stop
200191fi
201192
202193# Control Left - go back a word
203194key[Control-Left]=" ${terminfo[kLFT5]} "
204195if [[ -n " ${key[Control-Left]} " ]]; then
205- bindkey -M emacs " ${key[Control-Left]} " backward-word
206- bindkey -M viins " ${key[Control-Left]} " backward-word
207- bindkey -M vicmd " ${key[Control-Left]} " backward-word
196+ bindkey -M emacs " ${key[Control-Left]} " backward-word
197+ bindkey -M viins " ${key[Control-Left]} " backward-word
198+ bindkey -M vicmd " ${key[Control-Left]} " backward-word
208199fi
209200
210201# Control Left - go forward a word
211202key[Control-Right]=" ${terminfo[kRIT5]} "
212203if [[ -n " ${key[Control-Right]} " ]]; then
213- bindkey -M emacs " ${key[Control-Right]} " forward-word
214- bindkey -M viins " ${key[Control-Right]} " forward-word
215- bindkey -M vicmd " ${key[Control-Right]} " forward-word
204+ bindkey -M emacs " ${key[Control-Right]} " forward-word
205+ bindkey -M viins " ${key[Control-Right]} " forward-word
206+ bindkey -M vicmd " ${key[Control-Right]} " forward-word
216207fi
217208
218209# Alt Left - go back a word
219210key[Alt-Left]=" ${terminfo[kLFT3]} "
220211if [[ -n " ${key[Alt-Left]} " ]]; then
221- bindkey -M emacs " ${key[Alt-Left]} " backward-word
222- bindkey -M viins " ${key[Alt-Left]} " backward-word
223- bindkey -M vicmd " ${key[Alt-Left]} " backward-word
212+ bindkey -M emacs " ${key[Alt-Left]} " backward-word
213+ bindkey -M viins " ${key[Alt-Left]} " backward-word
214+ bindkey -M vicmd " ${key[Alt-Left]} " backward-word
224215fi
225216
226217# Control Right - go forward a word
227218key[Alt-Right]=" ${terminfo[kRIT3]} "
228219if [[ -n " ${key[Alt-Right]} " ]]; then
229- bindkey -M emacs " ${key[Alt-Right]} " forward-word
230- bindkey -M viins " ${key[Alt-Right]} " forward-word
231- bindkey -M vicmd " ${key[Alt-Right]} " forward-word
220+ bindkey -M emacs " ${key[Alt-Right]} " forward-word
221+ bindkey -M viins " ${key[Alt-Right]} " forward-word
222+ bindkey -M vicmd " ${key[Alt-Right]} " forward-word
232223fi
233-
234- # Load Mcfly
235- export MCFLY_FUZZY=true
236- export MCFLY_RESULTS=20
237- export MCFLY_INTERFACE_VIEW=BOTTOM
238- export MCFLY_RESULTS_SORT=LAST_RUN
239- eval " $( mcfly init zsh) "
240-
241- # # Run neofetch
242- # neofetch
0 commit comments