-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathzsh_custom
More file actions
40 lines (26 loc) · 992 Bytes
/
Copy pathzsh_custom
File metadata and controls
40 lines (26 loc) · 992 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
# fzf
export FZF_DEFAULT_COMMAND='fd --type f'
# Options to fzf command
export FZF_COMPLETION_OPTS='+c -x'
export FZF_ALT_C_OPTS="--preview 'tree -C {} | head -100'"
export FZF_CTRL_T_OPTS="--preview 'bat --color=always --line-range :500 {}'"
# Use fd (https://github.com/sharkdp/fd) instead of the default find
# command for listing path candidates.
# - The first argument to the function ($1) is the base path to start traversal
# - See the source code (completion.{bash,zsh}) for the details.
_fzf_compgen_path() {
fd --hidden --follow --exclude ".git" . "$1"
}
# Use fd to generate the list for directory completion
_fzf_compgen_dir() {
fd --type d --hidden --follow --exclude ".git" . "$1"
}
export FZF_CTRL_T_COMMAND="$FZF_DEFAULT_COMMAND"
[ -f ~/.fzf.zsh ] && source ~/.fzf.zsh
source "$ZDOTDIR/sourcedir"
sourcedir "$ZDOTDIR/zshrc"
# Starship prompt
eval "$(starship init zsh)"
# asdf-direnv
source "${XDG_CONFIG_HOME:-$HOME/.config}/asdf-direnv/zshrc"
# vim:ft=zsh