blob: 07ef3c3037b29bdb5aeddbc123f118a6f663f479 (
plain)
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
|
# fzf
# https://github.com/junegunn/fzf
# Dependencies:
# – fd (https://github.com/sharkdp/fd)
# – bat (https://github.com/sharkdp/bat)
# – ripgrep (https://github.com/BurntSushi/ripgrep)
provide-module connect-fzf %{
# Modules
require-module connect
# Register our paths
set-option -add global connect_paths "%opt{connect_modules_path}/fzf/aliases" "%opt{connect_modules_path}/fzf/commands"
# Commands
# Files
define-command fzf-files -params .. -file-completion -docstring 'Open files with fzf' %{
+ :fzf-files %arg{@}
}
# Buffers
define-command fzf-buffers -params ..1 -buffer-completion -docstring 'Open buffers with fzf' %{
+ :fzf-buffers %arg{@}
}
# Grep
define-command fzf-grep -params .. -file-completion -docstring 'Open files (search by content) with fzf' %{
+ :fzf-grep %arg{@}
}
# Aliases
alias global fzf fzf-files
}
|