Skip to content

Commit

Permalink
fish 4.0b1: alternate regular expression for auto version
Browse files Browse the repository at this point in the history
  • Loading branch information
melomac authored and Phidica committed Jan 1, 2025
1 parent 1ca9a4c commit 7269363
Showing 1 changed file with 2 additions and 2 deletions.
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

0 comments on commit 7269363

Please sign in to comment.