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

fish 4.0b1: alternate regular expression for auto version #30

Merged
merged 1 commit into from
Jan 1, 2025
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions highlighter_compat.py
Original file line number Diff line number Diff line change
Expand Up @@ -78,15 +78,15 @@ def __init__(self, view):
if out:
# For builds from source, version string may be e.g. "fish, version 3.0.2-1588-g70fc2611"
# Hence, we just search() for the match anywhere in the string
match = re.search(r'[0-9]+\.[0-9]+\.[0-9]+', out.strip())
match = re.search(r'.*version ([\d\.]+)', out.strip())
else:
CompatHighlighter.sysFishVer = 'not found' # Couldn't find executable

if err:
sublime.error_message(err)

if match:
CompatHighlighter.sysFishVer = match.group(0)
CompatHighlighter.sysFishVer = match.group(1)
elif out:
CompatHighlighter.sysFishVer = 'error' # This shouldn't happen!

Expand Down