-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.fzf.zsh
32 lines (25 loc) · 862 Bytes
/
.fzf.zsh
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
# Setup fzf
# ---------
if [[ ! "$PATH" == */opt/homebrew/opt/fzf/bin* ]]; then
PATH="${PATH:+${PATH}:}/opt/homebrew/opt/fzf/bin"
fi
source "/opt/homebrew/opt/fzf/shell/completion.zsh"
source "/opt/homebrew/opt/fzf/shell/key-bindings.zsh"
# Overrides (if required)
export FZF_COMPLETION_OPTS='--border --info=inline'
export FZF_DEFAULT_OPTS="$FZF_DEFAULT_OPTS \
--color=fg:#c0caf5,bg:#24283b,hl:#ff9e64 \
--color=fg+:#c0caf5,bg+:#292e42,hl+:#ff9e64 \
--color=info:#7aa2f7,prompt:#7dcfff,pointer:#7dcfff \
--color=marker:#9ece6a,spinner:#9ece6a,header:#9ece6a"
_fzf_compgen_dir() {
fd --type d --hidden --follow --exclude ".git" . "$1"
}
_fzf_compgen_path() {
fd --hidden --follow --exclude ".git" . "$1"
}
# kubectl
function kc {
local context=$(kubectl config get-contexts --output='name' | fzf)
kubectl config use-context $context
}