fzy

terminal fuzzy finder picker

git clone https://9o.is/git/fzy.git

commit cfe06730cd46bb6cb8100119e3872e1cf5d97529
parent dfcb5e0c24ce1c2bccb9d6e3c84b730fcaf14392
Author: Jul <jul@9o.is>
Date:   Sun, 25 Jan 2026 02:42:18 -0500

persist config.h

Diffstat:
M.gitignore | 1-
MMakefile | 10++--------
Aconfig.h | 27+++++++++++++++++++++++++++
3 files changed, 29 insertions(+), 9 deletions(-)

diff --git a/.gitignore b/.gitignore @@ -2,5 +2,4 @@ fzy fzytest *.o *.d -config.h test/acceptance/vendor/bundle diff --git a/Makefile b/Makefile @@ -31,12 +31,9 @@ check: test/fzytest fzy: $(OBJECTS) $(CC) $(CFLAGS) $(CCFLAGS) -o $@ $(OBJECTS) $(LIBS) -%.o: %.c config.h +%.o: %.c $(CC) $(CPPFLAGS) $(CFLAGS) -c -o $@ $< -config.h: src/config.def.h - cp src/config.def.h config.h - install: fzy mkdir -p $(DESTDIR)$(BINDIR) cp fzy $(DESTDIR)$(BINDIR)/ @@ -51,9 +48,6 @@ fmt: clean: rm -f fzy test/fzytest src/*.o src/*.d deps/*/*.o -veryclean: clean - rm -f config.h - -.PHONY: test check all clean veryclean install fmt acceptance +.PHONY: test check all clean install fmt acceptance -include $(OBJECTS:.o=.d) diff --git a/config.h b/config.h @@ -0,0 +1,27 @@ +#ifdef __cplusplus +extern "C" { +#endif + +#define TTY_COLOR_HIGHLIGHT TTY_COLOR_BLUE + +#define SCORE_GAP_LEADING -0.005 +#define SCORE_GAP_TRAILING -0.005 +#define SCORE_GAP_INNER -0.01 +#define SCORE_MATCH_CONSECUTIVE 1.0 +#define SCORE_MATCH_SLASH 0.9 +#define SCORE_MATCH_WORD 0.8 +#define SCORE_MATCH_CAPITAL 0.7 +#define SCORE_MATCH_DOT 0.6 + +/* Time (in ms) to wait for additional bytes of an escape sequence */ +#define KEYTIMEOUT 25 + +#define DEFAULT_TTY "/dev/tty" +#define DEFAULT_PROMPT "> " +#define DEFAULT_NUM_LINES 25 +#define DEFAULT_WORKERS 0 +#define DEFAULT_SHOW_INFO 1 + +#ifdef __cplusplus +} +#endif