Created
September 19, 2025 18:11
-
-
Save getsueineko/34b48981e836c0ddc88984e26e2b51b4 to your computer and use it in GitHub Desktop.
.zshrc
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # ===== History Settings ===== | |
| HISTSIZE=5000 | |
| HISTFILE=~/.zsh_history | |
| SAVEHIST=$HISTSIZE | |
| HISTDUP=erase | |
| # Options for better history management | |
| setopt appendhistory sharehistory # share history across sessions | |
| setopt hist_ignore_space hist_ignore_all_dups hist_save_no_dups | |
| setopt hist_ignore_dups hist_find_no_dups | |
| setopt inc_append_history_time # save history immediately with timestamp | |
| # ===== PATH ===== | |
| export PATH="$HOME/.local/bin:$HOME/bin:$PATH" | |
| # ===== Homebrew Environment ===== | |
| eval "$(/home/linuxbrew/.linuxbrew/bin/brew shellenv)" | |
| export XDG_DATA_DIRS="/home/linuxbrew/.linuxbrew/share:${XDG_DATA_DIRS:-/usr/local/share:/usr/share}" | |
| # ===== Completion System ===== | |
| autoload -Uz compinit && compinit | |
| # ===== fzf-tab Plugin ===== | |
| source ~/fzf-tab/fzf-tab.plugin.zsh | |
| # Enable history completion in fzf-tab | |
| # Combines current session history and file-based history | |
| zstyle ':fzf-tab:complete:history:*' fzf-preview 'fc -l 1 | tac; tail -n 5000 ~/.zsh_history | tac' | |
| zstyle ':fzf-tab:complete:history:*' fzf-switch '1' | |
| # Enable interactive previews for cd and zoxide completions | |
| zstyle ':fzf-tab:complete:cd:*' fzf-preview 'eza -1 --color=always $realpath' | |
| zstyle ':fzf-tab:complete:__zoxide_z:*' fzf-preview 'ls --color $realpath' | |
| # General completion settings | |
| eval "$(dircolors -b)" # ensure LS_COLORS is defined | |
| zstyle ':completion:*' matcher-list 'm:{a-z}={A-Za-z}' | |
| zstyle ':completion:*' list-colors "${(s.:.)LS_COLORS}" | |
| zstyle ':completion:*' menu no | |
| # ===== Aliases ===== | |
| alias wttr='wget -O - wttr.in/Moscow -q' | |
| # ===== Tools ===== | |
| eval "$(zoxide init zsh)" # zoxide integration for smart cd | |
| # ===== Starship Prompt & Plugins ===== | |
| source /home/linuxbrew/.linuxbrew/share/zsh-autosuggestions/zsh-autosuggestions.zsh | |
| source /home/linuxbrew/.linuxbrew/share/zsh-syntax-highlighting/zsh-syntax-highlighting.zsh | |
| eval "$(starship init zsh)" | |
| # ===== fzf Key Bindings ===== | |
| # Load fzf Zsh key bindings to enable Ctrl+R, etc. | |
| [ -f /home/linuxbrew/.linuxbrew/opt/fzf/shell/key-bindings.zsh ] && source /home/linuxbrew/.linuxbrew/opt/fzf/shell/key-bindings.zsh | |
| # Bind Ctrl+R to interactive history search | |
| bindkey '^R' fzf-history-widget |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment