feat(main, config): the big fzf update
This commit is contained in:
parent
4de9fd9e30
commit
11a19acd9e
2 changed files with 23 additions and 1 deletions
|
@ -11,7 +11,12 @@ OMP_THEME="basic"
|
||||||
HISTSIZE=5000
|
HISTSIZE=5000
|
||||||
#
|
#
|
||||||
## Whether to show pfetch when a shell starts or the shell is cleared. Only works if pfetch is installed
|
## Whether to show pfetch when a shell starts or the shell is cleared. Only works if pfetch is installed
|
||||||
## Possible Valuse: 0 (disabled), 1 (enabled, default)
|
## Possible values: 0 (disabled), 1 (enabled, default)
|
||||||
#
|
#
|
||||||
SHOW_PFETCH=1
|
SHOW_PFETCH=1
|
||||||
#
|
#
|
||||||
|
## Whether to use fzf for shell completions and other cool stuff. Only works when fzf is installed
|
||||||
|
## Possible values: 0 (disabled), 1 (enabled, default)
|
||||||
|
#
|
||||||
|
USE_FZF=1
|
||||||
|
#
|
||||||
|
|
17
main
17
main
|
@ -89,6 +89,13 @@ zinit light zsh-users/zsh-completions
|
||||||
# Inline Command Suggestions based on history
|
# Inline Command Suggestions based on history
|
||||||
zinit light zsh-users/zsh-autosuggestions
|
zinit light zsh-users/zsh-autosuggestions
|
||||||
#
|
#
|
||||||
|
# Initialize fzf if it exists
|
||||||
|
if [ "${USE_FZF}" = "1" ] && command -v fzf &> /dev/null
|
||||||
|
then
|
||||||
|
eval "$(fzf --zsh)"
|
||||||
|
zinit light Aloxaf/fzf-tab
|
||||||
|
fi
|
||||||
|
#
|
||||||
# Load the zsh completion system
|
# Load the zsh completion system
|
||||||
autoload -U compinit && compinit
|
autoload -U compinit && compinit
|
||||||
#
|
#
|
||||||
|
@ -119,6 +126,16 @@ alias ls="ls --color=auto"
|
||||||
# ls like colored completions
|
# ls like colored completions
|
||||||
zstyle ':completion:*' list-colors "${(s.:.)LS_COLORS}"
|
zstyle ':completion:*' list-colors "${(s.:.)LS_COLORS}"
|
||||||
#
|
#
|
||||||
|
# Ignore completion capitalisation
|
||||||
|
zstyle ':completion:*' matcher-list 'm:{a-z}={A-Za-z}'
|
||||||
|
#
|
||||||
|
# Disable the default autocompletion if fzf exists and show a better cd completion
|
||||||
|
if [ "${USE_FZF}" = "1" ] && command -v fzf &> /dev/null
|
||||||
|
then
|
||||||
|
zstyle ':completion:*' menu no
|
||||||
|
zstyle ':fzf-tab:complete:cd:*' fzf-preview 'ls --color $realpath'
|
||||||
|
fi
|
||||||
|
#
|
||||||
# Alias please to run0, doas, sudo or su
|
# Alias please to run0, doas, sudo or su
|
||||||
if command -v doas &> /dev/null
|
if command -v doas &> /dev/null
|
||||||
then
|
then
|
||||||
|
|
Loading…
Add table
Reference in a new issue