pindexis / marker

The terminal command palette
MIT License
2.02k stars 106 forks source link

Unescaped left brace in regex is deprecated, passed through in regex #37

Closed C0rWin closed 6 years ago

C0rWin commented 7 years ago

I've installed marker on OSX + zsh following the instructions, now when I'm pressing Ctrl-T getting following error on terminal screen:

Unescaped left brace in regex is deprecated, passed through in regex; marked by <-- HERE in m/{{ <-- HERE .+?}}/ at -e line 1.

What could be possible reason for this error and how I can fix it?

PS. I've tried both iTerm and Terminal.

xsysroot commented 6 years ago

C0rWin I'm not a programmer, but i change in file ~/.marker/bin/marker.sh next string: before: match=$(echo "$BUFFER" | perl -nle 'print $& if m{{{.+?}}}' | head -n 1) after: match=$(echo "$BUFFER" | perl -nle 'print $& if m{\{\{.+?\}\}}' | head -n 1) and this work !

et2010 commented 6 years ago

@xsysroot Thanks for the tip, but it doesn't work for me.

thejustsoul commented 6 years ago

Edit ~/.marker/bin/marker.sh

Find: match=$(echo "$BUFFER" | perl -nle 'print $& if m{{{.+?}}}' | head -n 1) Replace: match=$(echo "$BUFFER" | perl -nle 'print $& if m{\{\{.+?\}\}}' | head -n 1)

Find: match=$(echo "$READLINE_LINE" | perl -nle 'print $& if m{{{.+?}}}' | head -n 1) Replace: match=$(echo "$READLINE_LINE" | perl -nle 'print $& if m{{\{.+?\}}}' | head -n 1)

From https://github.com/haxrbyte/marker/commit/49f3738f1b0a0d025e44f1fdaccfa4f4ea01dff7

et2010 commented 6 years ago

@thejustsoul This fix works! Thanks!

pindexis commented 6 years ago

Sorry guys for not being active for a while, I'll do the upgrade. thanks @thejustsoul