diff options
| author | Bruce Hill <bruce@bruce-hill.com> | 2019-06-10 22:26:13 -0700 |
|---|---|---|
| committer | Bruce Hill <bruce@bruce-hill.com> | 2019-06-10 22:26:13 -0700 |
| commit | 792a39500ce926751f663eb54d2b58e3ed6fd427 (patch) | |
| tree | 05b7243a7d0f19bf14b9a68dafa479ddef25b687 /Makefile | |
| parent | 15e5de72f79f6154b02f48f4955bef93b11bfe0c (diff) | |
Simplified the make flags for fuzzy finding and asking. Cleaned up the
readme a bit.
Diffstat (limited to 'Makefile')
| -rw-r--r-- | Makefile | 17 |
1 files changed, 8 insertions, 9 deletions
@@ -4,7 +4,6 @@ CC=gcc CFLAGS=-O0 -std=gnu99 -D_XOPEN_SOURCE=500 -D_GNU_SOURCE -D_POSIX_C_SOURCE=200809L CWARN= -Wall -Wpedantic -Wno-unknown-pragmas -fsanitize=address -fno-omit-frame-pointer G=-g -PICKER= ifeq ($(shell uname),Darwin) CFLAGS += -D_DARWIN_C_SOURCE @@ -12,20 +11,20 @@ CWARN += -Weverything -Wno-missing-field-initializers -Wno-padded\ -Wno-missing-noreturn -Wno-cast-qual endif -ifneq (, $(shell which ask)) -ifeq (, $(ASKECHO)$(ASK)) -CFLAGS += -D'ASKECHO(prompt,initial)="ask --prompt=\"" prompt "\" --query=\"" initial "\""' +ifeq ($(PICKER),fzy) +CFLAGS += -D'PICK(prompt, initial)=" { printf \"\\033[3A\" >/dev/tty; fzy --lines=3 --prompt=\"" prompt "\" --query=\"" initial "\"; } "' endif -ifeq (, $(PICKER)) -PICKER=ask +ifeq ($(PICKER),fzf) +CFLAGS += -D'PICK(prompt, initial)=" { printf \"\\033[3A\" >/dev/tty; fzf --height=4 --prompt=\"" prompt "\" --query=\"" initial "\"; } "' endif +ifeq ($(PICKER),ask) +CFLAGS += -D'PICK(prompt, initial)=" ask --prompt=\"" prompt "\" --query=\"" initial "\" "' endif -ifneq (, $(PICKER)) -CFLAGS += -D'PICK(prompt, initial)="$(PICKER) --prompt=\"" prompt "\" --query=\"" initial "\""' +ifneq (, $(USE_ASK)) +CFLAGS += -D'USE_ASK=1' endif - all: $(NAME) clean: |
