mirror of
https://github.com/jimeh/dotfiles.git
synced 2026-02-19 04:46:41 +00:00
chore(zsh): make comments prettier :P
This commit is contained in:
28
zshenv
28
zshenv
@@ -7,29 +7,29 @@ if [[ -n "$ZPROF" ]]; then
|
||||
zmodload zsh/zprof
|
||||
fi
|
||||
|
||||
# Ensure compinit is NOT loaded before Zinit loads in ~/zshrc.
|
||||
# Ensure compinit is NOT loaded before Zinit loads in `~/zshrc`.
|
||||
skip_global_compinit=1
|
||||
|
||||
# ==============================================================================
|
||||
# PATH Setup
|
||||
# ==============================================================================
|
||||
|
||||
# Ensure values in path variable are unique
|
||||
# Ensure values in `path` variable are unique.
|
||||
typeset -U path
|
||||
|
||||
# Prevent loading ZSH startup from files /etc on macOS. The /etc/zprofile file
|
||||
# screws around with PATH, so we want to avoid it, and instead manually load the
|
||||
# files we care about.
|
||||
# Prevent loading ZSH start-up from files `/etc` on macOS. The `/etc/zprofile`
|
||||
# file screws around with `PATH`, so we want to avoid it, and instead manually
|
||||
# load the files we care about.
|
||||
if [[ "$OSTYPE" == "darwin"* ]]; then
|
||||
# Disable loading startup files from /etc
|
||||
# Disable loading start-up files from `/etc`.
|
||||
unsetopt GLOBAL_RCS
|
||||
|
||||
# Setup default PATH just like /etc/zprofile does
|
||||
# Setup default `PATH` just like `/etc/zprofile` does.
|
||||
if [ -x "/usr/libexec/path_helper" ]; then
|
||||
eval $(/usr/libexec/path_helper -s)
|
||||
fi
|
||||
|
||||
# Load /etc/zshenv if it exists
|
||||
# Load `/etc/zshenv` if it exists.
|
||||
if [ -f "/etc/zshenv" ]; then
|
||||
source "/etc/zshenv"
|
||||
fi
|
||||
@@ -262,7 +262,7 @@ fi
|
||||
|
||||
# Linuxbrew
|
||||
if [ -f "/home/linuxbrew/.linuxbrew/bin/brew" ]; then
|
||||
# Inline linux-brew setup to improve shell startup speed by around 200ms.
|
||||
# Inline linux-brew setup to improve shell startup speed by around 200 ms.
|
||||
export HOMEBREW_PREFIX="/home/linuxbrew/.linuxbrew"
|
||||
export HOMEBREW_CELLAR="${HOMEBREW_PREFIX}/Cellar"
|
||||
export HOMEBREW_REPOSITORY="${HOMEBREW_PREFIX}/Homebrew"
|
||||
@@ -287,14 +287,14 @@ if [ -d "$HOME/Library/Android/sdk" ]; then
|
||||
path_append "$ANDROID_HOME/platform-tools"
|
||||
fi
|
||||
|
||||
# Flutter environment setup
|
||||
# Flutter environment setup.
|
||||
path_append "/opt/flutter/bin"
|
||||
path_append "/opt/flutter/bin/cache/dart-sdk/bin"
|
||||
|
||||
# Use gnu-getop if available
|
||||
# Use gnu-getop if available.
|
||||
path_prepend "/usr/local/opt/gnu-getopt/bin"
|
||||
|
||||
# Homebrew setup
|
||||
# Homebrew setup.
|
||||
export HOMEBREW_NO_ANALYTICS=1
|
||||
|
||||
# Kubernetes setup
|
||||
@@ -304,7 +304,7 @@ if [ -d "$HOME/.krew" ]; then
|
||||
path_append "$HOME/.krew/bin"
|
||||
fi
|
||||
|
||||
# Use custom emacs install if available
|
||||
# Use custom Emacs installation if available.
|
||||
path_prepend "/opt/emacs/bin"
|
||||
|
||||
# evm setup.
|
||||
@@ -341,7 +341,7 @@ else
|
||||
export RUSTC_WRAPPER=""
|
||||
fi
|
||||
|
||||
# ~/.local/bin used by some tools (mise, pipx, lunar, toml-sort, etc.)
|
||||
# `~/.local/bin` used by some tools (mise, pipx, lunar, toml-sort, etc.)
|
||||
path_prepend "$HOME/.local/bin"
|
||||
|
||||
# mise setup
|
||||
|
||||
34
zshrc
34
zshrc
@@ -9,9 +9,9 @@ if [[ -n $VSCODE_RESOLVING_ENVIRONMENT ]]; then
|
||||
return
|
||||
fi
|
||||
|
||||
# In our zshenv file we have on macOS disabled loading ZSH startup files from
|
||||
# /etc to avoid /etc/zprofile messing up our carefully constructed PATH. So we
|
||||
# need to manually load the other files we care about.
|
||||
# In our `zshenv` file we have on macOS disabled loading ZSH start-up files from
|
||||
# `/etc` to avoid `/etc/zprofile` messing up our carefully constructed `PATH`.
|
||||
# So we need to manually load the other files we care about.
|
||||
if [[ "$OSTYPE" == "darwin"* ]] && [ -f "/etc/zshrc" ]; then
|
||||
source "/etc/zshrc"
|
||||
fi
|
||||
@@ -45,8 +45,8 @@ fi
|
||||
# Load Zinit
|
||||
source "${ZINIT[BIN_DIR]}/zinit.zsh"
|
||||
|
||||
# Add generic cross platform clipcopy and clippaste commands to copy and paste
|
||||
# from the system clipboard.
|
||||
# Add generic cross platform `clipcopy` and `clippaste` commands to copy and
|
||||
# paste from the system clipboard.
|
||||
zinit for @OMZ::lib/clipboard.zsh
|
||||
|
||||
# ==============================================================================
|
||||
@@ -77,7 +77,7 @@ fi
|
||||
# Set various sane defaults for ZSH history management.
|
||||
zinit for @OMZ::lib/history.zsh
|
||||
|
||||
# Map history search to ctrl-p and ctrl-n.
|
||||
# Map history search to <ctrl-p> and <ctrl-n>.
|
||||
# bindkey '^p' history-beginning-search-backward
|
||||
# bindkey '^n' history-beginning-search-forward
|
||||
|
||||
@@ -87,16 +87,16 @@ HISTSIZE=100000
|
||||
SAVEHIST=50000
|
||||
|
||||
## History command configuration
|
||||
setopt append_history # append history to HISTFILE
|
||||
setopt extended_history # record timestamp of command in HISTFILE
|
||||
setopt hist_expire_dups_first # delete duplicates first when HISTFILE size exceeds HISTSIZE
|
||||
setopt hist_find_no_dups # do not display a duplicate history entry
|
||||
setopt hist_ignore_dups # ignore duplicated commands history list
|
||||
setopt hist_ignore_space # ignore commands that start with space
|
||||
setopt hist_reduce_blanks # remove superfluous blanks before adding to history
|
||||
setopt hist_verify # show command with history expansion to user before running it
|
||||
setopt inc_append_history_time # add timestamp to HISTFILE in order of execution
|
||||
setopt share_history # share command history data
|
||||
setopt append_history # Append history to `HISTFILE`.
|
||||
setopt extended_history # Record timestamp of command in `HISTFILE`.
|
||||
setopt hist_expire_dups_first # Delete duplicates first when `HISTFILE` size exceeds `HISTSIZE`.
|
||||
setopt hist_find_no_dups # Do not display a duplicate history entry.
|
||||
setopt hist_ignore_dups # Ignore duplicated commands history list.
|
||||
setopt hist_ignore_space # Ignore commands that start with space.
|
||||
setopt hist_reduce_blanks # Remove superfluous blanks before adding to history.
|
||||
setopt hist_verify # Show command with history expansion to user before running it.
|
||||
setopt inc_append_history_time # Add timestamp to `HISTFILE` in order of execution.
|
||||
setopt share_history # Share command history data.
|
||||
|
||||
# ==============================================================================
|
||||
# Completion
|
||||
@@ -196,7 +196,7 @@ if command-exists fzf; then
|
||||
zstyle ':fzf-tab:*' prefix ''
|
||||
zstyle ':fzf-tab:*' switch-group '<' '>'
|
||||
|
||||
# Use fzf-tab's tmux popup for tab completion.
|
||||
# Use fzf-tab's tmux pop-up for tab completion.
|
||||
zstyle ':fzf-tab:*' fzf-command ftb-tmux-popup
|
||||
zstyle ':fzf-tab:*' popup-min-size 30 10
|
||||
zstyle ':fzf-tab:*' popup-pad 0 0
|
||||
|
||||
Reference in New Issue
Block a user