# Lines configured by zsh-newuser-install HISTFILE=~/.histfile HISTSIZE=10000 SAVEHIST=10000 setopt extendedglob nomatch notify histignorespace histignorealldups histnofunctions histnostore histverify incappendhistory unsetopt autocd beep bindkey -e #keybindings fpath=(~/bin $fpath) zstyle :compinstall filename '/home/anthonys/.zshrc' zstyle ":completion:*" complete _complete _ignored _approximate zstyle ":completion:*" glob 1 zstyle ":completion:*" insert-unambiguous true zstyle ':completion:*' menu select zstyle ':completion:*' rehash true zstyle ':completion:*' matcher-list 'r:|[._-]=* r:|=*' 'm:{[:lower:][:upper:]}={[:upper:][:lower:]}' zstyle ":completion:*" substitute 1 autoload -Uz up-line-or-beginning-search down-line-or-beginning-search zle -N up-line-or-beginning-search zle -N down-line-or-beginning-search [[ -n "$key[Up]" ]] && bindkey -- "$key[Up]" up-line-or-beginning-search [[ -n "$key[Down]" ]] && bindkey -- "$key[Down]" down-line-or-beginning-search autoload -Uz compinit promptinit promptinit compinit export COMPLETION_WAITING_DOTS="true" export VISUAL='nvim' export EDITOR='nvim' export ANDROID_HOME=$HOME/Android/sdk export PATH=$HOME/bin:$PATH:$ANDROID_HOME/platform-tools # antigen source $HOME/.antigen/antigen.zsh antigen use oh-my-zsh antigen bundle git antigen bundle command-not-found antigen bundle zsh-users/zsh-syntax-highlighting antigen bundle zsh-users/zsh-completions antigen bundle asdf antigen theme denysdovhan/spaceship-prompt # antigen theme romkatv/powerlevel10k powerlevel10k antigen apply # custom functions for powerlevel9k POWERLEVEL9K_ELIXIR_ICON=$'💧' POWERLEVEL9K_PYTHON_ICON=$'\U1F40D' prompt_custom_virtualenv() { local virtualenv_path="$VIRTUAL_ENV" if [[ -n "$virtualenv_path" && "$VIRTUAL_ENV_DISABLE_PROMPT" != true ]]; then local python_version="$(python --version | cut -d ' ' -f 2)" echo -n "$POWERLEVEL9K_PYTHON_ICON $(python --version) in $(basename $(dirname $virtualenv_path))" fi } POWERLEVEL9K_CUSTOM_VIRTUALENV="prompt_custom_virtualenv" prompt_asdf_elixir() { if [ $commands[asdf] ]; then ELIXIR_ICON=$'💧' local asdf_global_conf="$HOME/.tool-versions" local version_regex="s/^\([.0-9]*\).*/\1/p" local config_regex="s/.*(set by \(.*\))/\1/p" local elixir_current="$(asdf current elixir)" local elixir_current_version="$(echo $elixir_current | sed -n $version_regex)" local elixir_current_conf="$(echo $elixir_current | sed -n $config_regex)" local erlang_current="$(asdf current erlang)" local erlang_current_version="$(echo $erlang_current | sed -n $version_regex)" local erlang_current_conf="$(echo $erlang_current | sed -n $config_regex)" if [[ "${asdf_global_conf}" != "${elixir_current_conf}" || "${asdf_global_conf}" != "${erlang_current_conf}" ]]; then echo -n "💧 $elixir_current_version (on Erlang $erlang_current_version)" fi fi } POWERLEVEL9K_CUSTOM_ASDF_ELIXIR="prompt_asdf_elixir" export POWERLEVEL9K_IGNORE_TERM_COLORS=true export POWERLEVEL9K_PROMPT_ON_NEWLINE=true export POWERLEVEL9K_PROMPT_ADD_NEWLINE=true export POWERLEVEL9K_MULTILINE_FIRST_PROMPT_PREFIX="" export POWERLEVEL9K_MULTILINE_LAST_PROMPT_PREFIX="$fg[yellow]>$fg[magenta]>$fg[blue]> " export POWERLEVEL9K_LEFT_PROMPT_ELEMENTS=(dir dir_writable vcs custom_asdf_elixir) export POWERLEVEL9K_RIGHT_PROMPT_ELEMENTS=(custom_virtualenv command_execution_time) export VIRTUAL_ENV_DISABLE_PROMPT=1 alias 'onedrive-journal'="journalctl --user-unit onedrive -f" alias exa="exa -l --git" alias 'gld'='git log --graph --decorate' # pip 10.0.1 zsh completion start function _pip_completion { local words cword read -Ac words read -cn cword reply=( $( COMP_WORDS="$words[*]" \ COMP_CWORD=$(( cword-1 )) \ PIP_AUTO_COMPLETE=1 $words[1] ) ) } compctl -K _pip_completion pip # pip zsh completion end if [[ -a $HOME/.zshsrc ]]; then source $HOME/.zshsrc else printf "No zshsrc\nOne has been created" touch $HOME/.zshsrc fi # export TERM="tmux-256color" export SHELL="/bin/zsh" # asdf . $HOME/.asdf/asdf.sh . $HOME/.asdf/completions/asdf.bash export PATH="$(yarn global bin):$PATH" #THIS MUST BE AT THE END OF THE FILE FOR SDKMAN TO WORK!!! export SDKMAN_DIR="$HOME/.sdkman" [[ -s "$HOME/.sdkman/bin/sdkman-init.sh" ]] && source "$HOME/.sdkman/bin/sdkman-init.sh" alias default_tmux="tmux new-session -A -s DefaultSession"