test_patterns=(' ' '' 'fgit' 'ftp' 'ftps' 'ftpx' 'ghttps' 'git' 'http' 'https' 'httpss' 'httpx' ' http' 'ssh' 'rsync')
protocol_pattern='(|ftp(|s)|git|http(|s)|rsync|ssh)'
for p in $test_patterns[@]; do
url="${p}://test-url.com";
if [[ ${url} = ${~protocol_pattern}://* ]]; then
P -P "%F{green}pass%f: ${(qqq)p}"
else
P -P "%F{red}fail%f: ${(qqq)p}"
fi
done
Description
Simplify
.zinit-setup-plugin-dir
protocol patternHow Has This Been Tested?
Types of changes
Checklist: