Rename refBinding.key to head, and the stale key wording beside it

This commit is contained in:
2026-09-29 10:14:00 +02:00
committed by Lillem4n
parent a7d77bd3ad
commit 6275c6d41e
5 changed files with 14 additions and 14 deletions
+3 -3
View File
@@ -322,11 +322,11 @@ func splitArm(name string, refs map[string]refBinding) arm {
if !linked || len(b.tail) == 0 {
head := name
if linked {
head = b.key
head = b.head
}
return arm{spelling: name, head: head, path: head}
}
return pathArm(name, b.key, b.tail)
return pathArm(name, b.head, b.tail)
}
segs, err := splitPath(name)
if err != nil || len(segs) == 1 {
@@ -371,7 +371,7 @@ type callFn func(s *session, emitted string, operands []string) string
// re-scans the format.
type op struct {
formatToken
arms []arm // nameRead: the '|' alternatives, split into key and path once
arms []arm // nameRead: the '|' alternatives, split into head and tail once
call callFn
// operands are the fields the builtin reads, in the order its operands func
// fixed; expand reads them before the call. nil for a builtin that reads none.