Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add documentation for anchors #103

Open
2shea opened this issue May 21, 2021 · 0 comments
Open

Add documentation for anchors #103

2shea opened this issue May 21, 2021 · 0 comments

Comments

@2shea
Copy link
Contributor

2shea commented May 21, 2021

Anchors, ^ and $, are used in talon commands to anchor commands at the begging or end, similar to regex anchors (but with some differences).

Examples:

^ means "this can only be matched at the start of a phrase"
$ means "this can only be matched at the end of a phrase"

They can be combined. If you bind ^test one two three$ and you say test one two three four, it should not recognize.

They can be part of a longer sentence, for example, $ so it doesn't try to recognize commands while you're talking.

^wake up$ uses anchors so it can't be recognized mid sentence, which means fewer false positives.

Edge anchoring can change the meaning of a word depending on how it is used. e.g. over$ vs over can be two separate commands.

https://talonvoice.slack.com/archives/C7ENXA7C4/p1621350960040900

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant