Added ~/.local/rc.local import, if exists

This commit is contained in:
2025-04-07 18:32:57 -04:00
parent 4cf415c886
commit dd6646cf40

33
.zshrc
View File

@@ -1,26 +1,38 @@
# Exports
export PATH=$HOME/bin:/usr/local/bin:$HOME/.local/bin/:$PATH
export ZSH="$HOME/.oh-my-zsh"
# Export notes directory
if [[ -z $NOTES_DIR ]]; then
if [[ -d $HOME/Sync/MarkdownNotes ]]; then
export NOTES_DIR=$HOME/Sync/MarkdownNotes
else
if [[ -d $HOME/Documents ]]; then
export NOTES_DIR=$HOME/Documents
fi
fi
fi
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
# If rc.local exists, source it
[ -f ~/.local/rc.local ] && source ~/.local/rc.local
# User-defined Aliases and Functions
[[ ! -f ~/.shell_functions ]] || source ~/.shell_functions
[[ ! -f ~/.shell_aliases ]] || source ~/.shell_aliases
# ZSH History Options
# Reference: https://unix.stackexchange.com/questions/273861/unlimited-history-in-zsh
HISTFILE="$HOME/.zsh_history"
HISTSIZE=10000
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.
$HOME/dotfiles-zsh/get-quote.sh
# Instant Prompt Preamble
@@ -31,7 +43,6 @@ if [[ -r "${XDG_CACHE_HOME:-$HOME/.cache}/p10k-instant-prompt-${(%):-%n}.zsh" ]]
source "${XDG_CACHE_HOME:-$HOME/.cache}/p10k-instant-prompt-${(%):-%n}.zsh"
fi
# If .fzf.zsh exists, source it
[ -f ~/.fzf.zsh ] && source ~/.fzf.zsh