this repo has no description
at main 123 lines 2.9 kB view raw
1# Add Homebrew-installed zsh completion functions to fpath 2fpath=(/opt/homebrew/share/zsh/site-functions $fpath) 3 4# Nicer completion 5zstyle ':completion:*' menu select 6zstyle ':completion:*' matcher-list 'm:{a-zA-Z}={A-Za-z}' 7 8# Sane zsh completion without OMZ 9autoload -Uz compinit 10compinit -C -d "$HOME/.zcompdump" 11source "/opt/homebrew/opt/fzf-tab/share/fzf-tab/fzf-tab.zsh" 12 13# Make history useful 14HISTFILE="$HOME/.zsh_history" 15HISTSIZE=100000 16SAVEHIST=100000 17setopt SHARE_HISTORY 18setopt HIST_IGNORE_ALL_DUPS 19setopt HIST_REDUCE_BLANKS 20setopt HIST_IGNORE_SPACE 21setopt EXTENDED_HISTORY 22 23# Change directories without typing `cd` 24setopt autocd 25 26# Make less not suck 27export LESS='-R' 28export LESSHISTFILE='-' 29 30# Local scripts 31export PATH="$HOME/.local/bin:$PATH" 32 33# Preferred editor 34export EDITOR="micro" 35export VISUAL="micro" 36 37# XDG base dirs 38export XDG_CONFIG_HOME="$HOME/.config" 39 40# mise 41eval "$(mise activate zsh)" 42 43# starship 44eval "$(starship init zsh)" 45 46# zoxide 47eval "$(zoxide init zsh)" 48 49# navi 50if command -v navi >/dev/null 2>&1; then 51 eval "$(navi widget zsh)" 52 bindkey '^g' _navi_widget 53fi 54 55# fzf (Homebrew) 56if command -v fzf >/dev/null 2>&1; then 57 source <(fzf --zsh) 58fi 59 60# Custom Tailscale Alias 61# This provides a permanent shortcut to the Tailscale CLI embedded in the GUI app. 62alias tailscale='/Applications/Tailscale.app/Contents/MacOS/Tailscale' 63 64# exif Alias 65# Keeps my image file naming consistent 66alias exif='exiftool "-FileName<CreateDate" -d "%Y-%m-%d_%H-%M-%S-%%f.%%e"' 67 68# ls/eza aliases (prefer eza when available) 69if command -v eza >/dev/null 2>&1; then 70 alias l='eza --group-directories-first --icons=auto' 71 alias la='eza -a --group-directories-first --icons=auto' 72 alias ll='eza -la --git --group-directories-first --icons=auto --time-style=long-iso' 73 alias lt='eza --tree -a -L 2 --group-directories-first --icons=auto' 74else 75 alias ll='ls -alF' 76 alias la='ls -A' 77 alias l='ls -CF' 78fi 79alias g='git' 80 81# lazygit 82alias lg='lazygit' 83 84# bat 85alias b='bat' 86 87# ripgrep 88if command -v rg >/dev/null 2>&1; then 89 export RIPGREP_CONFIG_PATH="${XDG_CONFIG_HOME:-$HOME/.config}/ripgrep/config" 90 alias rgh='rg --hidden --glob "!.git"' 91 rgd() { 92 rg --json "$@" | delta 93 } 94fi 95 96# fd 97if command -v fd >/dev/null 2>&1; then 98 alias f='fd' 99 alias fdf='fd --type f' 100 alias fdd='fd --type d' 101 alias fdh='fd --hidden --no-ignore-vcs' 102fi 103 104# fd + bat + fzf file picker 105if command -v fd >/dev/null 2>&1 && command -v fzf >/dev/null 2>&1 && command -v bat >/dev/null 2>&1; then 106 fp() { 107 fd --type f --hidden --follow --exclude .git \ 108 | fzf --preview 'bat --style=numbers --color=always --line-range :200 {}' \ 109 --preview-window 'right,60%,border-left' 110 } 111fi 112 113# git-absorb 114if command -v git-absorb >/dev/null 2>&1; then 115 alias gabs='git absorb' 116 alias gabr='git absorb --and-rebase' 117fi 118 119# go home 120alias home='cd ~' 121 122# reload shell 123alias reload='source "$HOME/.zshrc"'