You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
if [[ -r"${XDG_CACHE_HOME:-$HOME/.cache}/p10k-instant-prompt-${(%):-%n}.zsh" ]];thensource"${XDG_CACHE_HOME:-$HOME/.cache}/p10k-instant-prompt-${(%):-%n}.zsh"fi
ZSHRC_PATH="$(readlink -f - $HOME/.config/zsh)/.zshrc"# get the path of the .zshrc symlink
ZSH_PATH=$(dirname $ZSHRC_PATH)# get the path of the zsh folder
LANG=en_US.UTF-8
# Options
setopt correct
setopt extendedglob
setopt nocaseglob
setopt rcexpandparam
setopt nobeep
setopt appendhistory
setopt inc_append_history
setopt histignorealldups
setopt autocd
setopt histignorespace
setopt share_history
setopt hist_expire_dups_first
setopt hist_ignore_dups
setopt hist_verify
setopt always_to_end
setopt hist_expire_dups_first
setopt hist_find_no_dups
setopt interactivecomments
# Aliasalias fd="cd ~ && cd \$(find * -type d | fzf)"# cd into a directoryalias lg="lazygit"alias g="git"alias vim="nvim"alias ..="cd .. && cd .."alias mysql=/usr/local/mysql/bin/mysql
alias mysqladmin=/usr/local/mysql/bin/mysqladmin
alias s="tmux-sessionizer"alias tn="tmux new -s $(pwd | sed 's/.*\///g')"alias cat="bat"if [[ -f$ZSH_PATH/config/custom.zsh ]];thensource$ZSH_PATH/config/custom.zsh
fi# Completions
FPATH=$(brew --prefix)/share/zsh-completions:$FPATH# History
HISTFILE=$ZDOTDIR/.histfile
HISTSIZE=1100000000
SAVEHIST=1000000000
bindkey "^[[A" history-search-backward
bindkey "^[[B" history-search-forward
bindkey -s "^FS""s\n"# Start tmux-sessionizer. Make sure "s" is an alias that executes "tmux-sessionizer"# Disable the highlighting of text pasted into the terminal.
zle_highlight=('paste:none')
autoload -U compinit; compinit
autoload -U colors; colors
source$ZSH_PATH/plugins/powerlevel10k/powerlevel10k.zsh-theme
# To customize prompt, run `p10k configure` or edit ~/.config/zsh//.p10k.zsh.
[[ !-f$ZSH_PATH/.p10k.zsh ]] ||source$ZSH_PATH/.p10k.zsh
# Variablesif [[ -n$SSH_CONNECTION ]];thenexport VISUAL='vim'export EDITOR='vim'export GIT_EDITOR='vim'elseexport EDITOR="$(which nvim)"export VISUAL="$EDITOR"export GIT_EDITOR="$EDITOR"fiexport TERM="wezterm"export TERMINFO="$HOME/.terminfo/"if [[ -s"$HOME/.config/bun/_bun" ]];thensource"$HOME/.config/bun/_bun"fiexport BUN_INSTALL="$HOME/.config/bun"export PATH=$HOME/.local/bin:$PATHexport PATH=$HOME/.config/bin:$HOME/.config/tmux/bin:$PATHexport PATH="$BUN_INSTALL/bin:$PATH"# Pluginssource$ZSH_PATH/plugins/fzf/fzf.zsh
source$ZSH_PATH/plugins/fzf-tab/fzf-tab.plugin.zsh
source$ZSH_PATH/plugins/zsh-autosuggestions/zsh-autosuggestions.plugin.zsh
source$ZSH_PATH/plugins/fast-syntax-highlighting/fast-syntax-highlighting.plugin.zsh
# Zoxideeval"$(zoxide init zsh)"# Tmuxexport T_FZF_BORDER_LABEL='tmux finder'export FZF_TMUX_OPTS="-p 100%,100%"# Fzfsource<(fzf --zsh)
show_file_or_dir_preview="if [ -d {} ]; then eza --tree --color=always {} | head -200; else bat -n --color=always --line-range :500 {}; fi"export FZF_CTRL_T_OPTS="--preview '$show_file_or_dir_preview'"# Advanced customization of fzf options via _fzf_comprun function# - The first argument to the function is the name of the command.# - You should make sure to pass the rest of the arguments to fzf.function_fzf_comprun() {
local command=$1shiftcase"$command"in
cd) fzf --preview 'eza --tree --color=always {} | head -200'"$@" ;;
export|unset) fzf --preview "eval 'echo \${}'""$@" ;;
ssh) fzf --preview 'dig {}'"$@" ;;
*) fzf --preview "$show_file_or_dir_preview""$@" ;;
esac
}
# bun completions
[ -s"$HOME/.config/bun/_bun" ] &&source"$HOME/.config/bun/_bun"# rustexport RUSTUP_HOME="$HOME/.config/rust/.rustup"export CARGO_HOME="$HOME/.config/rust/.cargo"# Eza (better ls)alias ls="eza --icons=always"# Batexport BAT_CONFIG_PATH="$HOME/.config/bat/bat.conf"# Yazi (file manager system)# Use y to change the current directory when exiting yazifunctiony() {
local tmp="$(mktemp -t "yazi-cwd.XXXXXX")"
yazi "$@" --cwd-file="$tmp"if cwd="$(cat -- "$tmp")"&& [ -n"$cwd" ] && [ "$cwd"!="$PWD" ];thencd -- "$cwd"fi
rm -f -- "$tmp"
}
# Edit command line in vim
autoload -U edit-command-line
zle -N edit-command-line
bindkey "^X^E" edit-command-line
# Use fzf for history search# bindkey '^R' fzf-history-widgetexport MANPAGER='nvim +Man!'# Use fzf to view and focus on aerospace windowsfunctionff() {
aerospace list-windows --all | fzf --bind 'enter:execute(bash -c "aerospace focus --window-id {1}")+abort'
}
zstyle ':completion:*:git-checkout:*' sort false
zstyle ':completion:*:descriptions' format '[%d]'
zstyle ':completion:*' list-colors ${(s.:.)LS_COLORS}
zstyle ':completion:*' menu no
zstyle ':fzf-tab:complete:cd:*' fzf-preview 'eza -1 --color=always $realpath'
zstyle ':fzf-tab:*' fzf-flags --color=fg:1,fg+:2 --bind=tab:accept
zstyle ':fzf-tab:*' use-fzf-default-opts yes
zstyle ':fzf-tab:*' switch-group '<''>'
No matter what I try I don't get this to work 😭 to be perfectly honest, a bunch of other stuff doesn't work, such as zstyle ':completion:*' list-colors ${(s.:.)LS_COLORS} never actually working before, or fzf's * completions. So there must be something I'm messing up with my configuration?
The text was updated successfully, but these errors were encountered:
This is my zshrc:
No matter what I try I don't get this to work 😭 to be perfectly honest, a bunch of other stuff doesn't work, such as
zstyle ':completion:*' list-colors ${(s.:.)LS_COLORS}
never actually working before, orfzf
's*
completions. So there must be something I'm messing up with my configuration?The text was updated successfully, but these errors were encountered: