Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(zinit-install): simplify protocol pattern #645

Merged
merged 1 commit into from
Mar 20, 2024

Conversation

vladdoster
Copy link
Member

Description

Simplify .zinit-setup-plugin-dir protocol pattern

How Has This Been Tested?

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
fail: " "
fail: "fgit"
pass: "ftp"
pass: "ftps"
fail: "ftpx"
fail: "ghttps"
pass: "git"
pass: "http"
pass: "https"
fail: "httpss"
fail: "httpx"
fail: "  http"
pass: "ssh"
pass: "rsync"

Types of changes

  • Breaking change (fix or feature that would cause existing functionality to change)
  • Bug fix (non-breaking change which fixes an issue)
  • Documentation change
  • New feature (non-breaking change which adds functionality)

Checklist:

  • All new and existing tests passed.
  • I have added tests to cover my changes.
  • I have updated the documentation accordingly.

zinit-install.zsh Outdated Show resolved Hide resolved
@vladdoster vladdoster force-pushed the fix/zinit-setup-plugin-dir-pattern branch from 1226afd to 4724c0b Compare March 19, 2024 23:06
@vladdoster vladdoster merged commit e8c3205 into main Mar 20, 2024
4 checks passed
@vladdoster vladdoster deleted the fix/zinit-setup-plugin-dir-pattern branch March 20, 2024 06:18
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant