Update on-load example in documentation (#2016)

This commit is contained in:
Joe Lim authored and GitHub committed 2025-06-21 13:57:19 +10:00
1 parent 44e716d2f1
commit 35b2764e27
3 files changed
+16 -4

No files matched your search

+6 -2
View File
@@ -1,6 +1,6 @@
.\" Automatically generated by Pandoc 2.11.4
.\"
.TH "LF" "1" "2025-06-20" "" "DOCUMENTATION"
.TH "LF" "1" "2025-06-21" "" "DOCUMENTATION"
.hy
.SH NAME
.PP
@@ -2225,11 +2225,15 @@ column:
\f[C]
cmd on-load &{{
cd \[dq]$(dirname \[dq]$1\[dq])\[dq] || exit 1
git rev-parse >/dev/null 2>&1 || exit 0
[ \[dq]$(git rev-parse --is-inside-git-dir 2>/dev/null)\[dq] = false ] || exit 0
cmds=\[dq]\[dq]
for file in \[dq]$\[at]\[dq]; do
case \[dq]$file\[dq] in
*/.git|*/.git/*) continue;;
esac
status=$(git status --porcelain --ignored -- \[dq]$file\[dq] | cut -c1-2 | head -n1)
if [ -n \[dq]$status\[dq] ]; then