Zsh Mailing List Archive
Messages sorted by: Reverse Date, Date, Thread, Author

Re: [PATCH] Add API wrapper to ${+_comps[...]}



On Oct 5, 10:33pm, Daniel Shahaf wrote:
}
} How would I handle a case such as 36725 (three patches to a single
} module)?

I'd have sent three separate messages, if they couldn't all be treated
as part of the same logical change.

} The difference between
} 
}    f() {
}      [[ $# == 1 ]] || return 2
}      (( $+_comps[$1] ))
}    }
} and
}    g() {
}      [[ $# == 1 ]] || return 2
}      (( $+_comps[$1] )) && (( $+functions[$_comps[$1]] ))
}    }
} 
} is how they handle the case 'compdef _foo foo' with _foo() not having
} being defined yet (nor marked for autoload).  Is this a common case?
} When does it happen?

Presently it doesn't EVER happen (except maybe in your startup files).
Which is why a function for (( $+_comps[$1] )) may not be very useful.

OTOH we've probably now batted this back and forth way too much, too.



Messages sorted by: Reverse Date, Date, Thread, Author