Skip to content

Ligature Request: =~ and !~ #293

Description

@sos4nt

In Ruby and Perl there is =~ to match a pattern (regex) and !~ to not match a pattern:

"foo" =~ /o/
"foo" !~ /o/

It would be nice to have ligatures for both of these operators.

I propose the almost equals sign and the not almost equals sign:

"foo"  /o/
"foo"  /o/

(Adjusted for width, of course)

Regarding #167 (export PATH=~/.local/bin:$PATH) – I thinks it's safe to "activate" these ligatures only when there is whitespace around them (which is the idiomatic way to write the operators in both, Ruby and Perl): X =~ Y would trigger, X=~Y would not.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

      Milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions