Skip to content

Commit

Permalink
feat: enhance zsh fzf completion
Browse files Browse the repository at this point in the history
  • Loading branch information
shiftgeist committed Sep 17, 2024
1 parent 5b91f54 commit eabcde7
Showing 1 changed file with 12 additions and 1 deletion.
13 changes: 12 additions & 1 deletion .zshrc
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
# ZSH CONFIG

# Zshrc helper
function zcompile-many() {
local f
Expand Down Expand Up @@ -71,12 +73,21 @@ unfunction zcompile-many
# Plugins
source "$(brew --prefix)/opt/fzf/shell/completion.zsh"
source "$(brew --prefix)/opt/fzf/shell/key-bindings.zsh"
source "$(brew --prefix)/opt/fzf/shell/key-bindings.zsh"
source "$(brew --prefix)/share/zsh/site-functions"
source "$ZSH_CONFIG/fzf-tab/fzf-tab.plugin.zsh"
source "$ZSH_CONFIG/alias-tips/alias-tips.plugin.zsh"
source "$XDG_CACHE/completion-for-pnpm.zsh"

# Completion Settings
# preview content or directory's content with eza when completing
zstyle ':fzf-tab:complete:*:*' fzf-preview 'bat --color=always --style=numbers --line-range=:500 $realpath 2>/dev/null || eza -la --color=always $realpath'
# switch group using `<` and `>`
zstyle ':fzf-tab:*' switch-group '<' '>'

# tabtab source for packages
# uninstall by removing these lines
[[ -f ~/.config/tabtab/zsh/__tabtab.zsh ]] && . ~/.config/tabtab/zsh/__tabtab.zsh || true

# Aliases that should not be pet's
alias run="pet exec"
alias horiceon="/usr/bin/git --git-dir=$HOME/code/horiceon --work-tree=$HOME"
Expand Down

0 comments on commit eabcde7

Please sign in to comment.