This commit is contained in:
Kovid Goyal 2023-08-30 09:36:28 +05:30
commit 48c80a218b
No known key found for this signature in database
GPG key ID: 06BC317B515ACE7C

View file

@ -417,12 +417,9 @@ func (self *Command) FindOptions(name_with_hyphens string) []*Option {
depth := 0
for p := self.Parent; p != nil; p = p.Parent {
depth++
x := p.FindOptions(name_with_hyphens)
if x != nil {
for _, po := range x {
if po.Depth >= depth {
ans = append(ans, po)
}
for _, po := range p.FindOptions(name_with_hyphens) {
if po.Depth >= depth {
ans = append(ans, po)
}
}
}