Closed rainchen closed 6 years ago
Oh, this is interesting. The issue doesn't appear in ST3, however I tried your example script in ST2 and indeed saw the same result. I narrowed the cause down to the appearance of any operator (;
, &
, |
, etc) appearing somewhere in a set of curly braces { }
. The match seeking unquoted strings within brace expansion appears to fall into an infinite loop in ST2. Presumably, some change in the regex engine for ST3 stops this from hanging the entire program.
I've determined a fix that solves the issue in ST2 and doesn't change any intended behaviour in ST3. If you continue to have this problem please reopen this issue. If you encounter a different but similar problem, please open a new issue.
thx for your quick response, it works.
but after some more testing, it still failing with these codes:
# A minimalist package manager for fish shell
# https://github.com/tuvistavie/fundle
function __fundle_url_rev -d "prints the revision from the url" -a git_url
set -l rev (echo $git_url | cut -d '#' -f 2 -s)
if test -n "$rev"
echo $rev
else
echo master
end
end
These codes look quite normal fish code to me. They come from https://github.com/tuvistavie/fundle/blob/master/functions/fundle.fish I didn't test all of them, btw.
Sorry about these issues; I never tested the syntax in ST2 but I really should have if I was going to claim ST2 compatibility. I'll continue working on fixes until I'm convinced that the syntax works correctly in ST2.
@rainchen Could you try the latest version, 2.2.5, in ST2? I've confirmed it works on all syntax tests I've written, as well as the example scripts you linked. Please let me know if you find any other examples that lead to a hang.
@Phidica updated to 2.2.5. found it still hanging with these codes: https://raw.githubusercontent.com/oh-my-fish/theme-jacaetevha/master/fish_prompt.fish
Thanks for your patience. Could you try again now, with version 2.2.6?
works fine now. Good jobs!
Thank you :) I'll leave this issue open a little longer and close it if nothing else comes up
sublime will often hang up when using this package to write fish codes.
hang up which means CPU's usage is 100% then not responding, I have to kill the sublime process to force quit.
for example, following codes will make my sublime hang up:
my sublime version is v2.0.2
Any idea?