Thread (2 messages) flat view 2 messages, 2 authors, 2021-09-27

Re: [PATCH v2 8/8] hook-list.h: add a generated list of hooks, like config-list.h

From: Junio C Hamano <hidden>
Date: 2021-09-27 16:48:49

Ævar Arnfjörð Bjarmason  [off-list ref] writes:
+sed -n \
+	-e '/^~~~~*$/ {x; s/^.*$/	"&",/; p;}' \
+	-e 'x' \
+	<Documentation/githooks.txt |
+	LC_ALL=C sort
Thanks.  It is not wrong per-se, but if you are willing to do a
multi-line script for readability, wouldn't a much more readable
"single long and multi-line string" approach, i.e.

    sed -ne '
	/^~~~~*$/ {
		x
		s/^.*$/ "&",/
		p
	}
	x
    ' Documentation/githooks.txt |
    LC_ALL=C sort

work better?
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help