summary refs log tree commit diff
path: root/bin/1sh
diff options
context:
space:
mode:
authorJune McEnroe <june@causal.agency>2019-11-21 17:02:53 -0500
committerJune McEnroe <june@causal.agency>2019-11-21 17:02:53 -0500
commit3f99c55cfc1cb5d824c46697d257cbf3d19d5d65 (patch)
treeb13018e501262c2fe65f17ee6539042b9f35c593 /bin/1sh
parentJust use H_LOAD and H_SAVE (diff)
downloadsrc-3f99c55cfc1cb5d824c46697d257cbf3d19d5d65.tar.gz
src-3f99c55cfc1cb5d824c46697d257cbf3d19d5d65.zip
Revert "Use local libedit"
This reverts commit 4ec42616876188657fde1230f7c2ccd8396f18b1.
Diffstat (limited to '')
-rw-r--r--bin/1sh/Makefile9
-rw-r--r--bin/1sh/histedit.c2
2 files changed, 4 insertions, 7 deletions
diff --git a/bin/1sh/Makefile b/bin/1sh/Makefile
index 547079ad..afd0350b 100644
--- a/bin/1sh/Makefile
+++ b/bin/1sh/Makefile
@@ -1,8 +1,8 @@
 PREFIX = /usr/local
 MANDIR = ${PREFIX}/share/man
 
-CFLAGS += -std=c99 -Wall -Wextra -DSHELL -Ilibedit
-LDLIBS = -lcurses
+CFLAGS += -std=c99 -Wall -Wextra -DSHELL
+LDLIBS = -ledit
 
 -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} libedit/libedit.a
+OBJS = ${SRCS:.c=.o}
 
 MANS = 1sh.1 1sh-kill.1 1sh-printf.1 1sh-test.1
 
@@ -49,9 +49,6 @@ all: tags 1sh
 
 ${OBJS}: ${GENHDRS}
 
-libedit/libedit.a:
-	${MAKE} -C libedit libedit.a
-
 builtins.c builtins.h: mkbuiltins builtins.def
 	sh mkbuiltins .
 
diff --git a/bin/1sh/histedit.c b/bin/1sh/histedit.c
index 4c0821dd..32e798e3 100644
--- a/bin/1sh/histedit.c
+++ b/bin/1sh/histedit.c
@@ -129,7 +129,7 @@ histedit(void)
 				el_set(el, EL_RPROMPT, getrprompt);
 				el_set(el, EL_ADDFN, "sh-complete",
 				    "Filename completion",
-				    _el_fn_complete);
+				    _el_fn_sh_complete);
 			} else {
 bad:
 				out2fmt_flush("sh: can't initialize editing\n");
014c938a8f4e4004e9365bfc6cf9cbd6&follow=1'>Makefile: do not include dependency-file on `make clean`Lynn Lin When envoking clean target, make should not perform the dependency file generation triggered by include. 2010-07-18ui-diff: Add link to ignore/show whitespace changes in diffsJohan Herland Add a link to the "Diffstat" line to ignore/show whitespace changes in the generated diff. To support this, cgit_commit_link() and cgit_diff_link() has learned to preserve the ctx.qry.ignorews variable. Signed-off-by: Johan Herland <johan@herland.net> 2010-07-18Add URL parameter 'ignorews' for optionally ignoring whitespace in diffsJohan Herland The new ctx.qry.ignorews variable is passed via cgit_diff_files() and cgit_diff_tree() to Git's diff machinery. This is equivalent to passing --ignore-all-space to 'git diff'. Signed-off-by: Johan Herland <johan@herland.net> 2010-07-13Reencode author and committerRémi Lagacé When a commit has a specific encoding, this encoding also applies to the author and committer name and email. Signed-off-by: Lars Hjemli <hjemli@gmail.com> 2010-06-19ui-log.c: allow commit range as search expressionLars Hjemli Inspired-by: Johan Herland <johan@herland.net> Signed-off-by: Lars Hjemli <hjemli@gmail.com> 2010-06-19ui-diff: Add links to increase/decrease number of context lines in diffsJohan Herland Add two links to the "Diffstat" line to show more/less context lines in the generated diff. To support this, cgit_commit_link() and cgit_diff_link() has learned to preserve the ctx.qry.context variable. Signed-off-by: Johan Herland <johan@herland.net> Signed-off-by: Lars Hjemli <hjemli@gmail.com> 2010-06-19Add URL parameter 'context' for changing the number of context lines in diffsJohan Herland The new ctx.qry.context variable is picked up by cgit_print_diff(), and passed via cgit_diff_files() to Git's diff machinery. Signed-off-by: Johan Herland <johan@herland.net> Signed-off-by: Lars Hjemli <hjemli@gmail.com> 2010-06-19ui-shared.c: path-limit style nitpickLars Hjemli This subjectively makes the path-limit bar less visually intrusive. Signed-off-by: Lars Hjemli <hjemli@gmail.com> 2010-06-19Fix style of commit-filter links in commit-subject.Johan Herland When using the commit-filter functionality to add e.g. bug tracker links to commit messages, the style of those links is mangled by a CSS directive that is meant to only apply to decorations that are listed on the commit-subject line. Fix this directive to only apply to the decorations. Signed-off-by: Johan Herland <johan@herland.net> Signed-off-by: Lars Hjemli <hjemli@gmail.com> 2010-06-19CGIT 0.8.3.2Lars Hjemli Signed-off-by: Lars Hjemli <hjemli@gmail.com> 2010-06-19ui-log: Preserve path limit in outgoing linksJohan Herland This allows navigation through the 'log' page/command without losing the active path limit. Signed-off-by: Johan Herland <johan@herland.net> Signed-off-by: Lars Hjemli <hjemli@gmail.com> 2010-06-19ui-shared: Preserve path limit in "tab bar" linksJohan Herland When using the "tab bar" in the pageheader to navigate between pages, any path limit in effect on the current page is forgotten in the link to the target page, even if the target page can interpret and use the path limit constructively. Instead, preserve the current page's path limit in the "tab bar" links to other pages, where the path limit is useful to the target page. Signed-off-by: Johan Herland <johan@herland.net> Signed-off-by: Lars Hjemli <hjemli@gmail.com> 2010-06-19ui-commit: Preserve path limit in links to commit pageJohan Herland This includes adding a path argument to cgit_commit_link() and updating all its callers. The callers from within the commit page (i.e. the "commit", "unidiff"/"side-by-side diff" and "parent" links) all preserve the path limit of the current commit page. All other callers pass NULL (i.e. no path limit). Signed-off-by: Johan Herland <johan@herland.net> Signed-off-by: Lars Hjemli <hjemli@gmail.com> 2010-06-19ui-commit: Preserve path limit in links to tree and diff pagesJohan Herland For tree links, the original link is unchanged, but in the case of a path limit, a subtree link is added to the right of the original tree link. Signed-off-by: Johan Herland <johan@herland.net> Signed-off-by: Lars Hjemli <hjemli@gmail.com> 2010-06-19ui-patch: Apply path limit to generated patchJohan Herland Also indicate in the comment section of the patch that a path limit was applied, too easily see when a generated patch is only partial. Signed-off-by: Johan Herland <johan@herland.net> Signed-off-by: Lars Hjemli <hjemli@gmail.com> 2010-06-19ui-commit: Limit diff based on path limit in qry.pathJohan Herland Signed-off-by: Johan Herland <johan@herland.net> Signed-off-by: Lars Hjemli <hjemli@gmail.com> 2010-06-19ui-diff: Teach diffstat to obey path limitJohan Herland Also indicate in the diffstat header if a path limit is in effect. Signed-off-by: Johan Herland <johan@herland.net> Signed-off-by: Lars Hjemli <hjemli@gmail.com> 2010-06-19ui-tree: Remove unnecessary path breadcrumb navigationJohan Herland The path breadcrumb navigation at the top of the 'tree' page has now been duplicated in ui-shared, which leaves the ui-tree implementation unnecessary. This patch removes the breadcrumb navigation from ui-tree, and moves the "(plain)" link that followed the breadcrumb when displaying blobs to the end of the next line, following the blob SHA1. Signed-off-by: Johan Herland <johan@herland.net> Signed-off-by: Lars Hjemli <hjemli@gmail.com> 2010-06-19ui-shared: Teach "breadcrumb" navigation to path limit display beneath tab barJohan Herland When a path limit is in effect, and displayed directly beneath the tab bar, it should offer breadcrumb navigation (like what the 'tree' page does), to allow changing the path limit easily. Implementing this requires a robust way to link back to the current page with a changed ctx->qry.path, but without losing track of the other query arguments. This is solved by adding the new cgit_self_link() function, which is then invoked repeatedly by the new cgit_print_path_crumbs() function while manipulating ctx->qry.path. Signed-off-by: Johan Herland <johan@herland.net> Signed-off-by: Lars Hjemli <hjemli@gmail.com> 2010-06-19ui-shared: Display path limit directly beneath tab bar in relevant pagesJohan Herland Design-wise, the path is shown by "expanding" the grey border between the tab bar and the content area of the page to house the current path limit. This is only displayed on pages where the path limit is relevant, and only when a path limit is in effect. Signed-off-by: Johan Herland <johan@herland.net> Signed-off-by: Lars Hjemli <hjemli@gmail.com> 2010-06-19ui-shared: Replace ctx.qry.path with ctx.qry.vpathJohan Herland In all cases where ui-shared uses ctx.qry.path, it is done so in the context of a in-project path, and not in the context in which the 'refs' page or the 'clone'-related functionality uses ctx.qry.path. Make this explicit by using ctx.qry.vpath instead. This path introduces no fundamental difference in functionality except for fixing some minor bugs, for example the Atom feed reference from a "$repo/refs/heads/" page. Note that the usage of ctx.qry.path in the other ui-<page>.c files is ok, since that code presumably is only executed in the context of its own <page>, so the correct interpretation of ctx.qry.path is never in question. Signed-off-by: Johan Herland <johan@herland.net> Signed-off-by: Lars Hjemli <hjemli@gmail.com> 2010-06-19struct cgit_cmd: Differentiate between various usages of ctx.qry.path