Skip to content

Commit

Permalink
fix: rule initialization
Browse files Browse the repository at this point in the history
  • Loading branch information
gazorby committed Dec 4, 2024
1 parent e953fcd commit a01650c
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 15 deletions.
8 changes: 1 addition & 7 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
repos:
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v4.3.0
rev: v5.0.0
hooks:
- id: check-toml
- id: mixed-line-ending
Expand All @@ -19,9 +19,3 @@ repos:
hooks:
- id: fish_syntax
- id: fish_indent

- repo: https://github.com/pre-commit/mirrors-prettier
rev: "v2.7.1"
hooks:
- id: prettier
types: [markdown]
18 changes: 10 additions & 8 deletions conf.d/fifc.fish
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
# Private
set -gx _fifc_comp_count 0
set -gx _fifc_unordered_comp
set -gx _fifc_ordered_comp

if status is-interactive
# Keybindings
set -qU fifc_keybinding
Expand All @@ -11,14 +16,7 @@ if status is-interactive
bind --mode $mode $fifc_keybinding _fifc
end

# Only load fifc rules when fish is launched fzf
else if set -q _fifc_launched_by_fzf
# Private
set -gx _fifc_comp_count 0
set -gx _fifc_unordered_comp
set -gx _fifc_ordered_comp

# Set sources
# Set sources rules
fifc \
-n 'test "$fifc_group" = "directories"' \
-s _fifc_source_directories
Expand All @@ -28,7 +26,10 @@ else if set -q _fifc_launched_by_fzf
fifc \
-n 'test "$fifc_group" = processes' \
-s 'ps -ax -o pid=,command='
end

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


# Fisher
function _fifc_uninstall --on-event fifc_uninstall
end

0 comments on commit a01650c

Please sign in to comment.