Created
June 4, 2021 14:32
-
-
Save blpabhishek/572334b6d19f8d9dec3604c232782a12 to your computer and use it in GitHub Desktop.
Updated .zshrc
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
export HOMEBREW_NO_GITHUB_API=1 | |
export HOMEBREW_NO_ANALYTICS=1 | |
export N_PREFIX=~/.n | |
#zmodload zsh/zprof | |
# Handle Zsh history | |
export HISTFILE=~/.zsh_history | |
export HISTSIZE=15000 | |
export SAVEHIST=10000 | |
setopt BANG_HIST # Treat the '' character specially during expansion. | |
setopt EXTENDED_HISTORY # Write the history file in the ":start:elapsed;command" format. | |
setopt INC_APPEND_HISTORY # Write to the history file immediately, not when the shell exits. | |
setopt SHARE_HISTORY # Share history between all sessions. | |
setopt HIST_EXPIRE_DUPS_FIRST # Expire duplicate entries first when trimming history. | |
setopt HIST_IGNORE_DUPS # Don't 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 # Don't record an entry starting with a space. | |
setopt HIST_SAVE_NO_DUPS # Don't write duplicate entries in the history file. | |
setopt HIST_REDUCE_BLANKS # Remove superfluous blanks before recording entry. | |
setopt HIST_VERIFY # Don't execute immediately upon history expansion. | |
setopt HIST_BEEP # Beep when accessing nonexistent history. | |
export LC_ALL="en_US.UTF-8" | |
export LC_CTYPE="en_IN.UTF-8" | |
export LANG="en_US.UTF-8" | |
# Check if zplug is installed | |
if [[ ! -d ~/.zplug ]]; then | |
git clone https://github.com/zplug/zplug ~/.zplug | |
source ~/.zplug/init.zsh | |
fi | |
# Essential | |
source ~/.zplug/init.zsh | |
zplug 'zplug/zplug', hook-build:'zplug --self-manage' | |
zplug "knu/z", use:z.sh | |
zplug 'tj/n', as:command, use:'bin/n' | |
zplug 'gcuisinier/jenv', as:command, use:'bin/jenv' | |
zplug 'syndbg/goenv', as:command, use:'bin/goenv' | |
zplug "b4b4r07/enhancd", use:init.sh | |
zplug "zsh-users/zsh-autosuggestions", defer:2 | |
zplug "zsh-users/zsh-syntax-highlighting", defer:2 | |
zplug "stedolan/jq", from:gh-r, as:command, rename-to:jq | |
zplug "direnv/direnv", as:command, rename-to:direnv, use:"direnv", hook-build:"make" | |
zplug "plugins/common-aliases", from:oh-my-zsh | |
zplug "plugins/git", from:oh-my-zsh | |
zplug "rgcr/m-cli", as:command, use:'m', if:"[[ $OSTYPE == *darwin* ]]" | |
zplug "plugins/git", from:oh-my-zsh | |
zplug 'dracula/zsh', as:theme | |
# zplug mafredri/zsh-async, from:github | |
# zplug themes/robbyrussell, from:oh-my-zsh, as:theme | |
# Install packages that have not been installed yet | |
if ! zplug check --verbose; then | |
printf "Install? [y/N]: " | |
if read -q; then | |
echo; zplug install | |
fi | |
fi | |
#zplug clean --force | |
zplug load | |
if type direnv >/dev/null 2>&1; then | |
eval "$(direnv hook zsh)" | |
fi | |
export PATH=$N_PREFIX/bin:$HOME/bin:$PATH | |
if type jenv > /dev/null 2>&1; then | |
eval "$(jenv init -)" | |
fi | |
if type goenv > /dev/null 2>&1; then | |
eval "$(goenv init -)" | |
fi | |
source ~/.envrc |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment