From a8cd87a52b91f41d3bec81b1a36fa224501f3af7 Mon Sep 17 00:00:00 2001 From: Curtis McEnroe Date: Sat, 12 Jan 2019 14:29:13 -0500 Subject: Use local libedit --- bin/cash/Makefile | 25 ++++++++++++++----------- bin/cash/histedit.c | 2 +- 2 files changed, 15 insertions(+), 12 deletions(-) (limited to 'bin') 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"); -- cgit 1.4.1 21bff0e064904210d8125d3f&follow=1'>link.sh (unfollow)
Commit message (Expand)Author
2020-03-09Add RPS1 and RPS2 right promptsJune McEnroe
2020-03-09Fix copyright and rcsidJune McEnroe
2020-03-09Replace strchrnul with strchrJune McEnroe
2020-03-09Replace eaccess with faccessatJune McEnroe
2020-03-09Replace st_mtim with st_mtimespecJune McEnroe
2020-03-09Replace sys_nsig with NSIGJune McEnroe
2020-03-09Replace 1sh MakefileJune McEnroe
2020-03-09Rename manual pages to 1shJune McEnroe
2020-03-09Move bltin out of subdirectoryJune McEnroe
2020-03-09Import /usr/src/usr.bin/printf from FreeBSD 12.1-RELEASEJune McEnroe
2020-03-09Import /usr/src/bin/test from FreeBSD 12.1-RELEASEJune McEnroe
2020-03-09Import /usr/src/bin/kill from FreeBSD 12.1-RELEASEJune McEnroe
2020-03-09Remove extraneous files from sh sourcesJune McEnroe
2020-03-09Import /usr/src/bin/sh from FreeBSD 12.1-RELEASEJune McEnroe
2020-03-09Remove 1sh sourcesJune McEnroe
2020-03-08Add The Stone SkyJune McEnroe
2020-03-08Publish "How I Relay Chat"June McEnroe
2020-03-03Don't use $ inside $(())June McEnroe
2020-03-03Remove setoptJune McEnroe
2020-03-03Use getopts in shell scriptsJune McEnroe
2020-02-27Style %T outside of Rs in italicJune McEnroe
2020-02-26Add Fierce Femmes and Notorious LiarsJune McEnroe
2020-02-23Add This Is How You Lose the Time WarJune McEnroe
2020-02-22Add See Ya LaterJune McEnroe
2020-02-20Remove wiki scriptJune McEnroe
2020-02-19Add The Obelisk GateJune McEnroe
2020-02-17Add Four Tet — HandsJune McEnroe
2020-02-12Simplify macOS notify-sendJune McEnroe
2020-02-12Add imbox and notemap to pageJune McEnroe
2020-02-12Collapse simple linksJune McEnroe
2020-02-12Move catgirl up the pageJune McEnroe
2020-02-12Update catgirl pty grabJune McEnroe
2020-02-12Link to cgit /about pages where appropriateJune McEnroe
2020-02-11Separate LINKS from BINS for html to workJune McEnroe
2020-02-11Add margin to Bl-bullet itemsJune McEnroe
2020-02-10Match URLs inside parens or with paired parens insideJune McEnroe
2020-02-10Duplicate effective URL before passing it back to curlJune McEnroe
2020-02-09Add To Be Taught, If FortunateJune McEnroe
2020-02-04Add The Future of Another TimelineJune McEnroe
2020-01-31Reorganize the Makefile for the umpteenth timeJune McEnroe
2020-01-28Change scout sensitivity to 1.4June McEnroe
2020-01-28Import shows.txtJune McEnroe