From e4be8a852385e78ceaae5ae46be9420d51dbc969 Mon Sep 17 00:00:00 2001 From: Malin Freeborn Date: Tue, 11 Feb 2025 19:09:37 +0100 Subject: [PATCH] allow any fuzzy finder --- Makefile | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/Makefile b/Makefile index c4e2977..e1d19b9 100644 --- a/Makefile +++ b/Makefile @@ -1,3 +1,6 @@ +FZF != command -v sk || command -v fzy || command -v fzf || \ + { echo install a fuzzy finder && exit 1 ;} + help: ## Print the help message @awk 'BEGIN {FS = ":.*?## "} /^[0-9a-zA-Z._-]+:.*?## / {printf "\033[36m%s\033[0m : %s\n", $$1, $$2}' $(MAKEFILE_LIST) | \ sort | \ @@ -31,7 +34,7 @@ database: $(default) ## Make a database for recfiles .PHONY: article article: ## Write an article - @path=$$(find . -type d -printf '%P\n' | fzy); \ + @path=$$(find . -type d -printf '%P\n' | $(FZF)); \ read -p "Title: " title; \ printf '%s\n' '---' >> $$path/$$title.md ; \ printf 'title: "%s"\n' "$$title" >> $$path/$$title.md ; \