Updated .zshrc and removed aliases and functions
This commit is contained in:
173
.zshrc
173
.zshrc
@@ -1,164 +1,33 @@
|
||||
# If you come from bash you might have to change your $PATH.
|
||||
# export PATH=$HOME/bin:/usr/local/bin:$PATH
|
||||
# Exports
|
||||
export PATH=$HOME/bin:/usr/local/bin:$HOME/.local/bin/:$PATH
|
||||
export ZSH="$HOME/.oh-my-zsh"
|
||||
|
||||
# Path to your oh-my-zsh installation.
|
||||
export ZSH=$HOME/.oh-my-zsh
|
||||
|
||||
# Set name of the theme to load. Optionally, if you set this to "random"
|
||||
# it'll load a random theme each time that oh-my-zsh is loaded.
|
||||
# See https://github.com/robbyrussell/oh-my-zsh/wiki/Themes
|
||||
# ZSH_THEME="robbyrussell"
|
||||
# ZSH_THEME="avit"
|
||||
# ZSH_THEME="bureau"
|
||||
ZSH_THEME=powerlevel10k/powerlevel10k
|
||||
|
||||
# Uncomment the following line to use case-sensitive completion.
|
||||
# CASE_SENSITIVE="true"
|
||||
|
||||
# Uncomment the following line to use hyphen-insensitive completion. Case
|
||||
# sensitive completion must be off. _ and - will be interchangeable.
|
||||
# HYPHEN_INSENSITIVE="true"
|
||||
|
||||
# Uncomment the following line to disable bi-weekly auto-update checks.
|
||||
# DISABLE_AUTO_UPDATE="true"
|
||||
|
||||
# Uncomment the following line to change how often to auto-update (in days).
|
||||
# export UPDATE_ZSH_DAYS=13
|
||||
|
||||
# Uncomment the following line to disable colors in ls.
|
||||
# DISABLE_LS_COLORS="true"
|
||||
|
||||
# Uncomment the following line to disable auto-setting terminal title.
|
||||
# DISABLE_AUTO_TITLE="true"
|
||||
|
||||
# Uncomment the following line to enable command auto-correction.
|
||||
ENABLE_CORRECTION="true"
|
||||
|
||||
# Uncomment the following line to display red dots whilst waiting for completion.
|
||||
COMPLETION_WAITING_DOTS="true"
|
||||
|
||||
# Uncomment the following line if you want to disable marking untracked files
|
||||
# under VCS as dirty. This makes repository status check for large repositories
|
||||
# much, much faster.
|
||||
# DISABLE_UNTRACKED_FILES_DIRTY="true"
|
||||
|
||||
# Uncomment the following line if you want to change the command execution time
|
||||
# stamp shown in the history command output.
|
||||
# The optional three formats: "mm/dd/yyyy"|"dd.mm.yyyy"|"yyyy-mm-dd"
|
||||
# HIST_STAMPS="mm/dd/yyyy"
|
||||
|
||||
# Would you like to use another custom folder than $ZSH/custom?
|
||||
# ZSH_CUSTOM=/path/to/new-custom-folder
|
||||
|
||||
# Which plugins would you like to load? (plugins can be found in ~/.oh-my-zsh/plugins/*)
|
||||
# Custom plugins may be added to ~/.oh-my-zsh/custom/plugins/
|
||||
# Example format: plugins=(rails git textmate ruby lighthouse)
|
||||
# Add wisely, as too many plugins slow down shell startup.
|
||||
plugins=(
|
||||
git
|
||||
zsh-syntax-highlighting
|
||||
)
|
||||
|
||||
# User configuration
|
||||
# ---------------------------------------------------------------------------------------------------------------------
|
||||
# ==> Source External Configs
|
||||
#
|
||||
ZSH_THEME="powerlevel10k/powerlevel10k"
|
||||
POWERLEVEL9K_MODE="nerdfont-complete"
|
||||
plugins=(git zsh-autosuggestions zsh-syntax-highlighting)
|
||||
export ZSH_COMPDUMP=$ZSH/cache/completions/.zcompdump-$HOST
|
||||
source $ZSH/oh-my-zsh.sh
|
||||
source $HOME/.zsh_aliases
|
||||
source $HOME/.zsh_functions
|
||||
|
||||
# If there is a .zsh_local file, source it
|
||||
[ -f ~/.zsh_local ] && source ~/.zsh_local
|
||||
# User-defined Aliases and Functions
|
||||
[[ ! -f ~/.shell_functions ]] || source ~/.shell_functions
|
||||
[[ ! -f ~/.shell_aliases ]] || source ~/.shell_aliases
|
||||
|
||||
# ---------------------------------------------------------------------------------------------------------------------
|
||||
# ==> History
|
||||
#
|
||||
HISTFILE=$HOME/.zsh_history
|
||||
HISTSIZE=50000
|
||||
SAVEHIST=50000
|
||||
fortune -a | cowsay | lolcat
|
||||
|
||||
setopt EXTENDED_HISTORY
|
||||
setopt HIST_VERIFY
|
||||
setopt HIST_EXPIRE_DUPS_FIRST # Expire duplicate entries first when trimming history.
|
||||
setopt HIST_IGNORE_DUPS # Dont record an entry that was just recorded again.
|
||||
setopt HIST_IGNORE_ALL_DUPS # Delete old recorded entry if new entry is a duplicate.
|
||||
setopt HIST_FIND_NO_DUPS # Do not display a line previously found.
|
||||
setopt HIST_IGNORE_SPACE # Dont record an entry starting with a space.
|
||||
setopt HIST_SAVE_NO_DUPS # Dont write duplicate entries in the history file.
|
||||
|
||||
setopt inc_append_history
|
||||
setopt share_history
|
||||
|
||||
# ---------------------------------------------------------------------------------------------------------------------
|
||||
# ==> KEY BINDINGS - from https://dougblack.io/words/zsh-vi-mode.html
|
||||
# Commented out on 2021-02-09 in favor of learning emacs bindings
|
||||
#
|
||||
#bindkey -v
|
||||
#bindkey '^P' up-history
|
||||
#bindkey '^N' down-history
|
||||
#bindkey '^?' backward-delete-char
|
||||
#bindkey '^h' backward-delete-char
|
||||
#bindkey '^w' backward-kill-word
|
||||
#bindkey '^r' history-incremental-search-backward
|
||||
#
|
||||
#bindkey "\e[1~" beginning-of-line
|
||||
#bindkey "\e[4~" end-of-line
|
||||
#bindkey "\e[5~" beginning-of-history
|
||||
#bindkey "\e[6~" end-of-history
|
||||
#bindkey "\e[3~" delete-char
|
||||
#bindkey "\e[2~" quoted-insert
|
||||
#bindkey "\e[5C" forward-word
|
||||
#bindkey "\eOc" emacs-forward-word
|
||||
#bindkey "\e[5D" backward-word
|
||||
#bindkey "\eOd" emacs-backward-word
|
||||
#bindkey "\ee[C" forward-word
|
||||
#bindkey "\ee[D" backward-word
|
||||
#
|
||||
#bindkey "^H" backward-delete-word
|
||||
|
||||
# ---------------------------------------------------------------------------------------------------------------------
|
||||
# ==> KEY BINDINGS - EMACS bindings because I work on lots of different machines
|
||||
# so I should get used to the defaults
|
||||
#
|
||||
bindkey -e
|
||||
setopt interactivecomments
|
||||
export KEYTIMEOUT=1
|
||||
|
||||
# ---------------------------------------------------------------------------------------------------------------------
|
||||
# ==> FZF
|
||||
#
|
||||
[ -f ~/.fzf.zsh ] && source ~/.fzf.zsh
|
||||
# Include hidden files
|
||||
export FZF_DEFAULT_COMMAND='find .'
|
||||
|
||||
# ---------------------------------------------------------------------------------------------------------------------
|
||||
# ==> set PATH so it includes user's private ~/bin if present
|
||||
PATH="$PATH:$HOME/.local/bin:$HOME/bin"
|
||||
|
||||
# ---------------------------------------------------------------------------------------------------------------------
|
||||
# ==> set PATH so it includes /usr/games if present
|
||||
PATH="$PATH:/usr/games"
|
||||
|
||||
# ---------------------------------------------------------------------------------------------------------------------
|
||||
# ==> Powerlevel10k https://github.com/romkatv/powerlevel10k
|
||||
#
|
||||
# To customize prompt, run `p10k configure` or edit ~/.p10k.zsh.
|
||||
[[ ! -f ~/.p10k.zsh ]] || source ~/.p10k.zsh
|
||||
# Instant Prompt Preamble
|
||||
# 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.
|
||||
# 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
|
||||
|
||||
# ---------------------------------------------------------------------------------------------------------------------
|
||||
# ==> Enable rootless control of virsh, if installed
|
||||
#
|
||||
if [[ -f /usr/bin/virsh ]]; then
|
||||
export LIBVIRT_DEFAULT_URI=qemu:///system
|
||||
fi
|
||||
|
||||
# ---------------------------------------------------------------------------------------------------------------------
|
||||
# ==> Show me a fortune tux when I log in!
|
||||
#
|
||||
fortune -a | cowsay -f tux
|
||||
# If .fzf.zsh exists, source it
|
||||
[ -f ~/.fzf.zsh ] && source ~/.fzf.zsh
|
||||
|
||||
# If .p10k.zsh exists, source it
|
||||
[[ ! -f ~/.p10k.zsh ]] || source ~/.p10k.zsh
|
||||
|
||||
# If .zshrc.$USER exists, source it
|
||||
[[ ! -f ~/.zshrc.$USER ]] || source ~/.zshrc.$USER
|
||||
|
||||
Reference in New Issue
Block a user