]> git.ipfire.org Git - thirdparty/vim.git/commitdiff
runtime(doc): non-portable sed regex in Makefile for pi_netrw.txt rule
authorYee Cheng Chin <ychin.git@gmail.com>
Fri, 28 Mar 2025 18:09:13 +0000 (19:09 +0100)
committerChristian Brabandt <cb@256bit.org>
Fri, 28 Mar 2025 18:11:11 +0000 (19:11 +0100)
Previously it was using '\0' in sed which is non-portable and does not
work in macOS. Fix this by using the '$' (end-of-line) regex atom (which
needs to be doubled in the Makefile) to append at the end instead. An
alternative would have been to use '&' which is the more portable
version of '\0'.

closes: #16996

Signed-off-by: Yee Cheng Chin <ychin.git@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
runtime/doc/Makefile

index 0f142a37229871db066c87d6dbdcc3769df1b937..01b2c3e83ff83524dfcaf71f79d9a52f0eef7aba 100644 (file)
@@ -143,7 +143,7 @@ os_win32.txt:
 
 pi_netrw.txt: ../pack/dist/opt/netrw/doc/netrw.txt
        cp ../pack/dist/opt/netrw/doc/netrw.txt $@.tmp
-       sed -e '1s/\(.*\)/\0    *pi_netrw.txt*/' $@.tmp > $@ && \
+       sed -e '1s/$$/  *pi_netrw.txt*/' $@.tmp > $@ && \
        rm -f $@.tmp
 
 vietnamese.txt: