From dff534442f16edb08b9a01a9bb01b6d7baf01911 Mon Sep 17 00:00:00 2001 From: Mattias Andrée Date: Fri, 14 Nov 2014 03:56:45 +0100 Subject: add tab-completion in shell MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Mattias Andrée --- Makefile | 34 +++++++++++++++++++++++++++++++++- 1 file changed, 33 insertions(+), 1 deletion(-) (limited to 'Makefile') diff --git a/Makefile b/Makefile index 364f3c0..7d37b36 100644 --- a/Makefile +++ b/Makefile @@ -29,9 +29,15 @@ CMDS = keccak-224sum keccak-256sum keccak-384sum keccak-512sum keccaksum \ +.PHONY: default +default: command shell + .PHONY: all -all: $(foreach C,$(CMDS),bin/$(C)) +all: command shell + +.PHONY: command +commands: $(foreach C,$(CMDS),bin/$(C)) bin/%: obj/%.o obj/common.o @mkdir -p bin @@ -42,6 +48,32 @@ obj/%.o: src/%.c src/*.h $(CC) $(FLAGS) $(COPTIMISE) -c -o $@ $< $(CFLAGS) $(CPPFLAGS) +.PHONY: shell +shell: bash zsh fish + +.PHONY: bash +bash: $(foreach C,$(CMDS),bin/$(C).bash) + +.PHONY: zsh +zsh: $(foreach C,$(CMDS),bin/$(C).zsh) + +.PHONY: fish +fish: $(foreach C,$(CMDS),bin/$(C).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: -rm -r bin obj -- cgit v1.2.3-70-g09d2