fix: ziextract execs discovery regex (#410)

Signed-off-by: Vladislav Doster <mvdoster@gmail.com>
This commit is contained in:
vladislav doster 2022-11-05 02:51:23 -05:00 committed by GitHub
parent 9987d5c781
commit 105b38a195
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -1880,8 +1880,8 @@ ziextract() {
execs=( **/*~(._zinit(|/*)|.git(|/*)|.svn(|/*)|.hg(|/*)|._backup(|/*))(DN-.) )
if [[ ${#execs} -gt 0 && -n $execs ]] {
execs=( ${(@f)"$( file ${execs[@]} )"} )
execs=( "${(M)execs[@]:#[^:]##:*executable*}" )
execs=( "${execs[@]/(#b)([^:]##):*/${match[1]}}" )
execs=( "${(M)execs[@]:#[^(:]##:*executable*}" )
execs=( "${execs[@]/(#b)([^(:]##):*/${match[1]}}" )
}
builtin print -rl -- ${execs[@]} >! ${TMPDIR:-/tmp}/zinit-execs.$$.lst