fzy
terminal fuzzy finder picker
git clone https://9o.is/git/fzy.git
commit 57f231ac03204737a4122404a15b95f1d37b3487 parent f6a99efc1e52eec4720b12620781abea9a117f54 Author: John Hawthorn <john.hawthorn@gmail.com> Date: Sat, 26 Jul 2014 21:51:27 -0700 Add version string Diffstat:
| M | Makefile | | | 3 | +++ |
| M | fzy.c | | | 5 | ++++- |
2 files changed, 7 insertions(+), 1 deletion(-)
diff --git a/Makefile b/Makefile @@ -1,3 +1,6 @@ +VERSION=0.1beta + +CPPFLAGS=-DVERSION=\"${VERSION}\" CFLAGS+=-Wall -Wextra -g -std=c99 PREFIX?=/usr/local diff --git a/fzy.c b/fzy.c @@ -232,7 +232,10 @@ void usage(const char *argv0){ } int main(int argc, char *argv[]){ - if(argc != 1){ + if(argc == 2 && !strcmp(argv[1], "-v")){ + printf("%s " VERSION " (c) 2014 John Hawthorn\n", argv[0]); + exit(EXIT_SUCCESS); + }else if(argc != 1){ usage(argv[0]); } atexit(reset_tty);