Optmize and add some aliass
This commit is contained in:
parent
805a5eeafb
commit
f7afcd5df6
1 changed files with 30 additions and 22 deletions
52
.zshrc
52
.zshrc
|
@ -1,12 +1,3 @@
|
|||
source /usr/share/zsh-theme-powerlevel10k/powerlevel10k.zsh-theme
|
||||
source /usr/share/zsh/plugins/zsh-autosuggestions/zsh-autosuggestions.zsh
|
||||
# Enable Powerlevel10k instant prompt. Should stay close to the top of ~/.zshrc.
|
||||
# Initialization code that may require console input (password prompts, [y/n]
|
||||
# confirmations, etc.) must go above this block; everything else may go below.
|
||||
if [[ -r "${XDG_CACHE_HOME:-$HOME/.cache}/p10k-instant-prompt-${(%):-%n}.zsh" ]]; then
|
||||
source "${XDG_CACHE_HOME:-$HOME/.cache}/p10k-instant-prompt-${(%):-%n}.zsh"
|
||||
fi
|
||||
|
||||
USE_POWERLINE="true"
|
||||
setopt correct # Auto corect mistakes
|
||||
setopt nobeep # No beep
|
||||
|
@ -34,6 +25,32 @@ zstyle ':completion:*' accept-exact '*(N)'
|
|||
zstyle ':completion:*' use-cache on
|
||||
zstyle ':completion:*' cache-path ~/.zsh/cache
|
||||
|
||||
## Plugins section: Enable fish style features
|
||||
source /usr/share/zsh-theme-powerlevel10k/powerlevel10k.zsh-theme
|
||||
source /usr/share/zsh/plugins/zsh-autosuggestions/zsh-autosuggestions.zsh
|
||||
# Enable Powerlevel10k instant prompt. Should stay close to the top of ~/.zshrc.
|
||||
# Initialization code that may require console input (password prompts, [y/n]
|
||||
# confirmations, etc.) must go above this block; everything else may go below.
|
||||
if [[ -r "${XDG_CACHE_HOME:-$HOME/.cache}/p10k-instant-prompt-${(%):-%n}.zsh" ]]; then
|
||||
source "${XDG_CACHE_HOME:-$HOME/.cache}/p10k-instant-prompt-${(%):-%n}.zsh"
|
||||
fi
|
||||
|
||||
# To customize prompt, run `p10k configure` or edit ~/.p10k.zsh.
|
||||
[[ ! -f ~/.p10k.zsh ]] || source ~/.p10k.zsh
|
||||
|
||||
|
||||
# Offer to install missing package if command is not found
|
||||
if [[ -r /usr/share/zsh/functions/command-not-found.zsh ]]; then
|
||||
source /usr/share/zsh/functions/command-not-found.zsh
|
||||
export PKGFILE_PROMPT_INSTALL_MISSING=1
|
||||
fi
|
||||
|
||||
# Use syntax highlighting
|
||||
source /usr/share/zsh/plugins/zsh-syntax-highlighting/zsh-syntax-highlighting.zsh
|
||||
# Use history substring search
|
||||
source /usr/share/zsh/plugins/zsh-history-substring-search/zsh-history-substring-search.zsh
|
||||
|
||||
# Key bindings section
|
||||
# vi mode
|
||||
bindkey -v
|
||||
export KEYTIMEOUT=1
|
||||
|
@ -82,11 +99,6 @@ bindkey -s '^o' 'lfcd\n'
|
|||
autoload edit-command-line; zle -N edit-command-line
|
||||
bindkey '^e' edit-command-line
|
||||
|
||||
## Plugins section: Enable fish style features
|
||||
# Use syntax highlighting
|
||||
source /usr/share/zsh/plugins/zsh-syntax-highlighting/zsh-syntax-highlighting.zsh
|
||||
# Use history substring search
|
||||
source /usr/share/zsh/plugins/zsh-history-substring-search/zsh-history-substring-search.zsh
|
||||
# bind UP and DOWN arrow keys to history substring search
|
||||
zmodload zsh/terminfo
|
||||
bindkey "$terminfo[kcuu1]" history-substring-search-up
|
||||
|
@ -94,16 +106,12 @@ bindkey "$terminfo[kcud1]" history-substring-search-down
|
|||
bindkey '^[[A' history-substring-search-up
|
||||
bindkey '^[[B' history-substring-search-down
|
||||
|
||||
# Offer to install missing package if command is not found
|
||||
if [[ -r /usr/share/zsh/functions/command-not-found.zsh ]]; then
|
||||
source /usr/share/zsh/functions/command-not-found.zsh
|
||||
export PKGFILE_PROMPT_INSTALL_MISSING=1
|
||||
fi
|
||||
|
||||
# Aliases
|
||||
alias jshell=/usr/lib/jvm/java-17-openjdk/bin/jshell
|
||||
alias Data='/media/Data'
|
||||
alias Work='/media/Work_files'
|
||||
alias University='/media/University'
|
||||
|
||||
export PATH="$HOME/.yarn/bin:$HOME/.config/yarn/global/node_modules/.bin:$PATH"
|
||||
|
||||
# To customize prompt, run `p10k configure` or edit ~/.p10k.zsh.
|
||||
[[ ! -f ~/.p10k.zsh ]] || source ~/.p10k.zsh
|
||||
|
||||
|
|
Loading…
Reference in a new issue