summary refs log tree commit diff
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--bin/cash/Makefile25
-rw-r--r--bin/cash/histedit.c2
2 files changed, 15 insertions, 12 deletions
diff --git a/bin/cash/Makefile b/bin/cash/Makefile
index 22b2a1b8..f1f026f0 100644
--- a/bin/cash/Makefile
+++ b/bin/cash/Makefile
@@ -1,8 +1,8 @@
 PREFIX = /usr/local
 MANDIR = $(PREFIX)/share/man
 
-CFLAGS += -std=c99 -Wall -Wextra -DSHELL
-LDLIBS = -ledit
+CFLAGS += -std=c99 -Wall -Wextra -DSHELL -Ilibedit
+LDLIBS = -lcurses
 
 -include config.mk
 
@@ -38,7 +38,7 @@ GENSRCS = builtins.c nodes.c syntax.c
 GENHDRS = builtins.h nodes.h syntax.h token.h
 
 SRCS += $(GENSRCS)
-OBJS = $(SRCS:.c=.o)
+OBJS = $(SRCS:.c=.o) libedit/libedit.a
 
 MAN1 = cash.1 cash-kill.1 cash-printf.1 cash-test.1
 
@@ -47,16 +47,11 @@ all: tags cash
 cash: $(OBJS)
 	$(CC) $(LDFLAGS) $(OBJS) $(LDLIBS) -o $@
 
-tags: *.h *.c
-	ctags -w *.h *.c
-
-depend: $(SRCS) $(GENHDRS)
-	$(CC) $(CFLAGS) -MM $(SRCS) > .depend
-
--include .depend
-
 $(OBJS): $(GENHDRS)
 
+libedit/libedit.a:
+	$(MAKE) -C libedit libedit.a
+
 builtins.c builtins.h: mkbuiltins builtins.def
 	sh mkbuiltins .
 
@@ -69,6 +64,14 @@ syntax.c syntax.h: mksyntax
 token.h: mktokens
 	sh mktokens
 
+tags: *.h *.c
+	ctags -w *.h *.c
+
+depend: $(SRCS) $(GENHDRS)
+	$(CC) $(CFLAGS) -MM $(SRCS) > .depend
+
+-include .depend
+
 clean:
 	rm -f cash $(OBJS) mknodes mksyntax $(GENSRCS) $(GENHDRS) tags .depend
 
diff --git a/bin/cash/histedit.c b/bin/cash/histedit.c
index 4e8ff8b2..3c77c6e8 100644
--- a/bin/cash/histedit.c
+++ b/bin/cash/histedit.c
@@ -125,7 +125,7 @@ histedit(void)
 				el_set(el, EL_RPROMPT, getrprompt);
 				el_set(el, EL_ADDFN, "sh-complete",
 				    "Filename completion",
-				    _el_fn_sh_complete);
+				    _el_fn_complete);
 			} else {
 bad:
 				out2fmt_flush("sh: can't initialize editing\n");
7022965fdbe1b61298dc6a05be2d2a34d&follow=1'>Use formatParse split to position input cursorJune McEnroe 2018-09-12Factor out IRC formatting parsingJune McEnroe 2018-09-11Add /help equivalent to /manJune McEnroe 2018-09-11Don't render every PM as a pingJune McEnroe 2018-09-11Add urlOpenMatchJune McEnroe 2018-09-10Depend on man.sh for chroot.tar targetJune McEnroe 2018-09-10Set LESSSECURE=1 in man.shJune McEnroe 2018-09-10Add /man commandJune McEnroe 2018-09-10Install man page in chrootJune McEnroe 2018-09-10Install man pageJune McEnroe 2018-09-10Split keys into subsections and document colorsJune McEnroe 2018-09-10Add "blank" lines to chatte.1June McEnroe 2018-09-10Document key bindings in chatte.1June McEnroe 2018-09-08Document slash commands in chatte.1June McEnroed>June McEnroe 2021-01-11Enable diff.colorMovedJune McEnroe 2021-01-10Set less search case-insensitiveJune McEnroe 2021-01-10Set EXINITJune McEnroe neovim is laggy as hell in my OpenBSD VM, so I switched to vi so I could type without getting frustrated. 2021-01-09Add c -t flag to print expression typeJune McEnroe Also add missing float case. 2021-01-05Update taglineJune McEnroe