From 18ea9b03508268b083ce5b73fecc819264c0171d Mon Sep 17 00:00:00 2001 From: Bruce Hill Date: Sat, 15 Jun 2019 17:43:55 -0700 Subject: [PATCH] Silenced some error messages from `which` --- Makefile | 24 ++++++++++++------------ 1 file changed, 12 insertions(+), 12 deletions(-) diff --git a/Makefile b/Makefile index 3902c84..b799664 100644 --- a/Makefile +++ b/Makefile @@ -19,18 +19,18 @@ ifeq (, $(PICKER)) endif ifneq (, $(PICKER)) PICKER_FLAG=-D"PICK(prompt, initial)=\"$(PICKER)\"" -endif -ifeq ($(shell which $(PICKER)),$(shell which fzy || echo '')) - PICKER_FLAG=-D'PICK(prompt, initial)="{ printf \"\\033[3A\" >/dev/tty; fzy --lines=3 --prompt=\"" prompt "\" --query=\"" initial "\"; }"' -endif -ifeq ($(shell which $(PICKER)),$(shell which fzf || echo '')) - PICKER_FLAG=-D'PICK(prompt, initial)="{ printf \"\\033[3A\" >/dev/tty; fzf --height=4 --prompt=\"" prompt "\" --query=\"" initial "\"; }"' -endif -ifeq ($(shell which $(PICKER)),$(shell which ask || echo '')) - PICKER_FLAG=-D'PICK(prompt, initial)="ask --prompt=\"" prompt "\" --query=\"" initial "\""' -endif -ifeq ($(shell which $(PICKER)),$(shell which pick || echo '')) - PICKER_FLAG=-D'PICK(prompt, initial)="pick -q \"" initial "\""' + ifeq ($(shell which $(PICKER)),$(shell which fzy 2>/dev/null || echo '')) + PICKER_FLAG=-D'PICK(prompt, initial)="{ printf \"\\033[3A\" >/dev/tty; fzy --lines=3 --prompt=\"" prompt "\" --query=\"" initial "\"; }"' + endif + ifeq ($(shell which $(PICKER)),$(shell which fzf 2>/dev/null || echo '')) + PICKER_FLAG=-D'PICK(prompt, initial)="{ printf \"\\033[3A\" >/dev/tty; fzf --height=4 --prompt=\"" prompt "\" --query=\"" initial "\"; }"' + endif + ifeq ($(shell which $(PICKER)),$(shell which ask 2>/dev/null || echo '')) + PICKER_FLAG=-D'PICK(prompt, initial)="ask --prompt=\"" prompt "\" --query=\"" initial "\""' + endif + ifeq ($(shell which $(PICKER)),$(shell which pick 2>/dev/null || echo '')) + PICKER_FLAG=-D'PICK(prompt, initial)="pick -q \"" initial "\""' + endif endif CFLAGS += $(PICKER_FLAG)