diff options
Diffstat (limited to 'dot_config/zsh/dot_zshrc')
-rw-r--r-- | dot_config/zsh/dot_zshrc | 37 |
1 files changed, 13 insertions, 24 deletions
diff --git a/dot_config/zsh/dot_zshrc b/dot_config/zsh/dot_zshrc index 829b5a7..350571a 100644 --- a/dot_config/zsh/dot_zshrc +++ b/dot_config/zsh/dot_zshrc @@ -1,3 +1,4 @@ +#!/usr/bin/env zsh # Enable Powerlevel10k instant prompt. Should stay close to the top of ~/.config/zsh/.zshrc. # Initialization code that may require console input (password prompts, [y/n] # confirmations, etc.) must go above this block; everything else may go below. @@ -11,6 +12,8 @@ then else ID=$(uname -s) fi + +# Load Powerlevel10k theme case "$ID" in Darwin ) source /usr/local/share/powerlevel10k/powerlevel10k.zsh-theme @@ -25,31 +28,15 @@ case "$ID" in ;; esac +if [ -x "$(command -v gem)" ]; then + export GEM_HOME="$(gem env user_gemhome)" + export PATH="$PATH:$GEM_HOME/bin" +fi # Enable colors and change prompt: autoload -U colors && colors # Load colors -setopt autocd # Automatically cd into typed directory. #stty stop undef # Disable ctrl-s to freeze terminal. -setopt interactive_comments -setopt complete_aliases -# History in cache directory: -HISTSIZE=100000000 -SAVEHIST=100000000 -HISTFILE="$XDG_STATE_HOME"/zsh/history -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. # Load aliases and shortcuts if existent. [ -f "${XDG_CONFIG_HOME:-$HOME/.config}/zsh/aliasrc" ] && source "${XDG_CONFIG_HOME:-$HOME/.config}/zsh/aliasrc" @@ -64,10 +51,6 @@ zmodload zsh/complist compinit -d ~/.cache/zsh/zcompdump-$ZSH_VERSION _comp_options+=(globdots) # Include hidden files. -# To customize prompt, run `p10k configure` or edit ~/.config/zsh/. p10k.zsh. -[[ ! -f ~/.config/zsh/.p10k.zsh ]] || source ~/.config/zsh/.p10k.zsh -[[ ! -f ~/.config/zsh/keybindings.zsh ]] || source ~/.config/zsh/keybindings.zsh - if [ -n "$WSL_DISTRO_NAME" ] then command_not_found_handler() { @@ -104,3 +87,9 @@ case "$ID" in ;; esac +# Windows Terminal stuff +PS1="\[\033]133;D;\007\]\[\033]133;A;\007\]$PS1\[\033]133;B;\007\]" + +# To customize prompt, run `p10k configure` or edit ~/.config/zsh/. p10k.zsh. +[[ ! -f ~/.config/zsh/.p10k.zsh ]] || source ~/.config/zsh/.p10k.zsh +[[ ! -f ~/.config/zsh/keybindings.zsh ]] || source ~/.config/zsh/keybindings.zsh
\ No newline at end of file |