zsh tweaks

This commit is contained in:
William Ball 2026-04-05 19:48:25 -04:00
parent 5d9cb59cb1
commit 8afe42c5c5
Signed by: wball
SSH key fingerprint: SHA256:3K3IvjUp1U5HwsIRYy/vosnG8l/A84LPUSAKQ6oCGKI

View file

@ -22,15 +22,15 @@ setopt HIST_IGNORE_DUPS
setopt HIST_REDUCE_BLANKS setopt HIST_REDUCE_BLANKS
setopt HIST_FIND_NO_DUPS setopt HIST_FIND_NO_DUPS
function fzf-history-widget() { # options
local selected_command=$(history -rn 1 | fzf --preview 'echo {}' --preview-window=down:3:wrap) setopt autocd auto_param_slash
if [[ -n $selected_command ]]; then setopt interactive_comments
LBUFFER="$selected_command"
fi # disable C-s
zle reset-prompt stty stop undef
}
zle -N fzf-history-widget # fzf
bindkey '^R' fzf-history-widget source <(fzf --zsh)
# Enable command completion # Enable command completion
autoload -Uz compinit && compinit autoload -Uz compinit && compinit
@ -44,10 +44,5 @@ zstyle ':completion:*' matcher-list 'm:{a-zA-Z}={A-Za-z}'
source /usr/share/zsh/plugins/zsh-syntax-highlighting/zsh-syntax-highlighting.zsh source /usr/share/zsh/plugins/zsh-syntax-highlighting/zsh-syntax-highlighting.zsh
source /usr/share/zsh/plugins/zsh-autosuggestions/zsh-autosuggestions.zsh source /usr/share/zsh/plugins/zsh-autosuggestions/zsh-autosuggestions.zsh
# zoxide PROMPT="[%F{#83a598}%n %F{#b8bb26}%~%f] %F{#8ec07c}λ%f "
eval "$(zoxide init zsh)" RPROMPT="[%F{#d79921}%?%f]"
# prompt
eval "$(starship init zsh)"
[ -f "/home/wball/.local/share/ghcup/env" ] && . "/home/wball/.local/share/ghcup/env" # ghcup-env