Skip to content

Commit a01650c

Browse files
committed
fix: rule initialization
1 parent e953fcd commit a01650c

File tree

2 files changed

+11
-15
lines changed

2 files changed

+11
-15
lines changed

.pre-commit-config.yaml

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
repos:
22
- repo: https://github.com/pre-commit/pre-commit-hooks
3-
rev: v4.3.0
3+
rev: v5.0.0
44
hooks:
55
- id: check-toml
66
- id: mixed-line-ending
@@ -19,9 +19,3 @@ repos:
1919
hooks:
2020
- id: fish_syntax
2121
- id: fish_indent
22-
23-
- repo: https://github.com/pre-commit/mirrors-prettier
24-
rev: "v2.7.1"
25-
hooks:
26-
- id: prettier
27-
types: [markdown]

conf.d/fifc.fish

Lines changed: 10 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,8 @@
1+
# Private
2+
set -gx _fifc_comp_count 0
3+
set -gx _fifc_unordered_comp
4+
set -gx _fifc_ordered_comp
5+
16
if status is-interactive
27
# Keybindings
38
set -qU fifc_keybinding
@@ -11,14 +16,7 @@ if status is-interactive
1116
bind --mode $mode $fifc_keybinding _fifc
1217
end
1318

14-
# Only load fifc rules when fish is launched fzf
15-
else if set -q _fifc_launched_by_fzf
16-
# Private
17-
set -gx _fifc_comp_count 0
18-
set -gx _fifc_unordered_comp
19-
set -gx _fifc_ordered_comp
20-
21-
# Set sources
19+
# Set sources rules
2220
fifc \
2321
-n 'test "$fifc_group" = "directories"' \
2422
-s _fifc_source_directories
@@ -28,7 +26,10 @@ else if set -q _fifc_launched_by_fzf
2826
fifc \
2927
-n 'test "$fifc_group" = processes' \
3028
-s 'ps -ax -o pid=,command='
29+
end
3130

31+
# Load fifc preview rules only when fish is launched fzf
32+
if set -q _fifc_launched_by_fzf
3233
# Builtin preview/open commands
3334
fifc \
3435
-n 'test "$fifc_group" = "options"' \
@@ -59,6 +60,7 @@ else if set -q _fifc_launched_by_fzf
5960
-e '^\\h*([0-9]+)'
6061
end
6162

63+
6264
# Fisher
6365
function _fifc_uninstall --on-event fifc_uninstall
6466
end

0 commit comments

Comments
 (0)