Last active
January 2, 2022 06:31
-
-
Save webdevsuperfast/822995ecd4c999fc13c4715d51cd7e9c to your computer and use it in GitHub Desktop.
My ZSH Configuration on PopOS with Antibody & Spaceship Theme
This file contains hidden or 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
zdharma-continuum/fast-syntax-highlighting | |
zsh-users/zsh-autosuggestions | |
zsh-users/zsh-history-substring-search | |
zsh-users/zsh-completions | |
buonomo/yarn-completion | |
spaceship-prompt/spaceship-prompt |
This file contains hidden or 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
# Enable autocompletions | |
autoload -Uz compinit | |
typeset -i updated_at=$(date +'%j' -r ~/.zcompdump 2>/dev/null || stat -f '%Sm' -t '%j' ~/.zcompdump 2>/dev/null) | |
if [ $(date +'%j') != $updated_at ]; then | |
compinit -i | |
else | |
compinit -C -i | |
fi | |
zmodload -i zsh/complist | |
# Save history so we get auto suggestions | |
HISTFILE=$HOME/.zsh_history | |
HISTSIZE=100000 | |
SAVEHIST=$HISTSIZE | |
# Options | |
setopt auto_cd # cd by typing directory name if it's not a command | |
setopt auto_list # automatically list choices on ambiguous completion | |
setopt auto_menu # automatically use menu completion | |
setopt always_to_end # move cursor to end if word had one match | |
setopt hist_ignore_all_dups # remove older duplicate entries from history | |
setopt hist_reduce_blanks # remove superfluous blanks from history items | |
setopt inc_append_history # save history entries as soon as they are entered | |
setopt share_history # share history between different instances | |
setopt correct_all # autocorrect commands | |
setopt interactive_comments # allow comments in interactive shells | |
# Improve autocompletion style | |
zstyle ':completion:*' menu select # select completions with arrow keys | |
zstyle ':completion:*' group-name '' # group results by category | |
zstyle ':completion:::::' completer _expand _complete _ignored _approximate # enable approximate matches for completion | |
# Pyenv | |
export PATH="$HOME/.pyenv/bin:$PATH" | |
eval "$(pyenv init --path)" | |
eval "$(pyenv virtualenv-init -)" | |
# NVM | |
export NVM_DIR="$HOME/.nvm" | |
[ -s "$NVM_DIR/nvm.sh" ] && \. "$NVM_DIR/nvm.sh" # This loads nvm | |
[ -s "$NVM_DIR/bash_completion" ] && \. "$NVM_DIR/bash_completion" # This loads nvm bash_completion | |
# RBENV | |
eval "$(rbenv init -)" | |
# Homebrew | |
eval "$(/home/linuxbrew/.linuxbrew/bin/brew shellenv)" | |
# Theme | |
SPACESHIP_PROMPT_ORDER=( | |
user # Username section | |
dir # Current directory section | |
host # Hostname section | |
git # Git section (git_branch + git_status) | |
hg # Mercurial section (hg_branch + hg_status) | |
exec_time # Execution time | |
line_sep # Line break | |
vi_mode # Vi-mode indicator | |
jobs # Background jobs indicator | |
exit_code # Exit code section | |
char # Prompt character | |
) | |
# Antibody | |
source <(antibody init) | |
antibody bundle < ~/.plugins.txt | |
# Install Ruby Gems to ~/.gems | |
export GEM_HOME="$HOME/.gems" | |
export PATH="$HOME/.gems/bin:$PATH" | |
# Yarn | |
export PATH="$(yarn global bin):$PATH" | |
# Lokl | |
export PATH="$HOME/.software/lokl-cli:$PATH" | |
# Speedtest | |
export PATH="$HOME/.software/ookla-speedtest:$PATH" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment