Add fzf stuff

This commit is contained in:
2026-09-20 19:47:40 -07:00
parent b29bf1c6c0
commit cda76b4128
+4 -2
View File
@@ -15,7 +15,7 @@ function load_plugin {
}
# cmd_exists <name>
function cmd_exists {
hash "${1}" >/dev/null 2>&1
(( ${+commands[${1}]} ))
}
# source_user_file <name>
function source_user_file {
@@ -116,7 +116,7 @@ if [[ -v NVIM ]]; then
elif [[ "${is_in_distrobox}" == true ]]; then
if [[ -v INSIDE_EMACS ]]; then
[[ -z "${XDG_RUNTIME_DIR}" ]] && \
export XDG_RUNTIME_DIR="/run/user/${UID}"
export XDG_RUNTIME_DIR="/run/user/1000"
export EDITOR='distrobox-host-exec emacsclient -a nvim'
alias emacs='distrobox-host-exec emacsclient -a nvim'
else
@@ -398,6 +398,8 @@ bindkey -M vicmd 'j' history-substring-search-down
bindkey -M emacs '^P' history-substring-search-up
bindkey -M emacs '^N' history-substring-search-down
cmd_exists fzf && source <(fzf --zsh)
# Only match at the beginning of the line
HISTORY_SUBSTRING_SEARCH_PREFIXED="true"
HISTORY_SUBSTRING_SEARCH_HIGHLIGHT_FOUND=""