From 600af502aaedcc496ac3dc0771888de978f3e31c Mon Sep 17 00:00:00 2001 From: Mattias Andrée Date: Wed, 3 Dec 2014 10:57:37 +0100 Subject: add completion MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Mattias Andrée --- Makefile | 29 +++++++++++++++++++++++++++-- 1 file changed, 27 insertions(+), 2 deletions(-) (limited to 'Makefile') diff --git a/Makefile b/Makefile index ba128c6..8efdab5 100644 --- a/Makefile +++ b/Makefile @@ -50,10 +50,10 @@ FLAGS = $(WARN) -std=gnu99 .PHONY: default -default: command +default: command shell .PHONY: all -all: command +all: command shell .PHONY: command @@ -68,6 +68,31 @@ obj/%.o: src/%.c $(CC) $(FLAGS) $(COPTIMISE) -c -o $@ $< $(CFLAGS) $(CPPFLAGS) +.PHONY: shell +shell: bash zsh fish + +.PHONY: bash +bash: bin/$(COMMAND).bash + +.PHONY: zsh +zsh: bin/$(COMMAND).zsh + +.PHONY: fish +fish: bin/$(COMMAND).fish + +bin/%.bash: src/completion + @mkdir -p bin + auto-auto-complete bash --output $@ --source $< command="$*" + +bin/%.zsh: src/completion + @mkdir -p bin + auto-auto-complete zsh --output $@ --source $< command="$*" + +bin/%.fish: src/completion + @mkdir -p bin + auto-auto-complete fish --output $@ --source $< command="$*" + + .PHONY: clean clean: -- cgit v1.2.3-70-g09d2