From 4ec42616876188657fde1230f7c2ccd8396f18b1 Mon Sep 17 00:00:00 2001 From: June 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/cash') 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 in (unfollow)
Commit message (Expand)Author
2019-04-07Add AmatkaJune McEnroe
2019-04-03Add Space OperaJune McEnroe
2019-03-22Add An Unkindness of GhostsJune McEnroe
2019-03-14Highlight line continuations in line commentsJune McEnroe
2019-03-14Add The Long Way to a Small Angry PlanetJune McEnroe
2019-03-10Add Bleachers Tiny Desk ConcertJune McEnroe
2019-02-28Add Station ElevenJune McEnroe
2019-02-27Use getsubopt(3) to parse -o options in hiJune McEnroe
2019-02-27Add type and ulimit shell keywordsJune McEnroe
2019-02-27Fix make target pattern whitespace in hiJune McEnroe
2019-02-27Delete extraneous <pre> in html.shJune McEnroe
2019-02-24Use setopt in upJune McEnroe
2019-02-24Add setoptJune McEnroe
2019-02-20Match make targets as TagJune McEnroe
2019-02-20Use $PWD in html.sh to pass absolute path to manJune McEnroe
2019-02-20Factor out html.sh and produce html for all sourcesJune McEnroe
2019-02-20Add Dirk Gently's Holistic Detective AgencyJune McEnroe
2019-02-20Move /opt/pkg after /usr in PATHJune McEnroe
2019-02-20Set man_hard_wrap in nvimJune McEnroe
2019-02-18Use hi -o anchor in upJune McEnroe
2019-02-18Don't match nested parentheses in Tag for CJune McEnroe
2019-02-18Match whitespace between * [] {}June McEnroe
2019-02-18Fix function-like #define regexJune McEnroe
2019-02-18Match Tag in RustJune McEnroe
2019-02-18Match sh functions as TagJune McEnroe
2019-02-18Match Sh and Ss as Tag in mdocJune McEnroe
2019-02-18Match statics and typedefs as TagJune McEnroe
2019-02-18Clean up htmlHeaderJune McEnroe
2019-02-18Remove hi line numberingJune McEnroe
2019-02-18Add Tag class to hiJune McEnroe
2019-02-17Generate HTML with hi -n -f html -o anchorJune McEnroe
2019-02-17Add hi -f html -o anchor for line number linksJune McEnroe
2019-02-17Simplify temp trap in upJune McEnroe
2019-02-17Add line numbers to hiJune McEnroe
2019-02-17Always split spans after newlinesJune McEnroe
2019-02-15Color format specifiers light cyan in vimJune McEnroe
2019-02-15Highlight Interp as yellowJune McEnroe
2019-02-15Highlight strings in sh command substitutionsJune McEnroe
2019-02-15Add nmap gpJune McEnroe
2019-02-14Avoid newline when copying URL to pasteboardJune McEnroe
2019-02-13Add forgotten "sixth" book of H2G2June McEnroe