You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Many thanks for sublime-fish module! It has been (and still is) the companion one can hope for since I am using Sublime Text and fish-shell, for more than a decade.
I'd like to inform you the code to parse the version wouldn't expect the recently introduced 4.0b1 version number:
Error in fish.sublime-settings: The 'auto' setting was unable to determine your fish version. Please report a bug using Preferences > Package Settings > Fish > Report a bug. Include your system information, and the output of 'fish --version' in your terminal. To work around this error, set 'compat_highlighter_fish_version' in the settings file.
Fish version: fish, version 4.0b1-13-g541f8b47b (built with brew install fish --HEAD)
# Currently, I can't imagine this happening. Prove me wrong!
Ahahah
Considering 4.0b1 means 4.0 in term of compatibility, it is probably safe to consider an alternative regular expression to match numbers and dots up to the eventual - separator, as I proposed in virtualfish project here, ex:
diff --git a/highlighter_compat.py b/highlighter_compat.py
index af2804f..c08cb1d 100644
--- a/highlighter_compat.py+++ b/highlighter_compat.py@@ -78,7 +78,7 @@ class CompatHighlighter(sublime_plugin.ViewEventListener, BaseHighlighter):
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
@@ -86,7 +86,7 @@ class CompatHighlighter(sublime_plugin.ViewEventListener, BaseHighlighter):
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!
sublime-fish/highlighter_compat.py
Line 81 in 1ca9a4c
Hi
Many thanks for sublime-fish module! It has been (and still is) the companion one can hope for since I am using Sublime Text and fish-shell, for more than a decade.
I'd like to inform you the code to parse the version wouldn't expect the recently introduced 4.0b1 version number:
Fish version:
fish, version 4.0b1-13-g541f8b47b
(built withbrew install fish --HEAD
)sublime-fish/highlighter_compat.py
Line 380 in 1ca9a4c
Ahahah
Considering 4.0b1 means 4.0 in term of compatibility, it is probably safe to consider an alternative regular expression to match numbers and dots up to the eventual - separator, as I proposed in virtualfish project here, ex:
But you might prefer something closer to this:
sublime-fish/highlighter_compat.py
Line 398 in 1ca9a4c
I am going to give it a try and I'll be honored to humbly contribute to your project with such a simple PR.
Many thanks again for maintaining this project.
The text was updated successfully, but these errors were encountered: