Repository navigation
Fix empty triggers causing expansion on every word separator (#1616) - #2508
Merged
Merged
Conversation
…panso#2483) When running commands like `espanso service --help` or `espanso package --help`, the CLI was displaying the main application help instead of the specific subcommand help. This was caused by using `clap_instance.print_help()` which always prints the root command help, instead of using `err.exit()` which properly handles contextual help for subcommands. Fix: Use `err.exit()` to let Clap handle contextual help display. Fixes espanso#2483
…#1616) When a trigger was set to an empty string (""), it would expand on every word separator, causing unexpected text replacements. Now empty triggers are filtered out during configuration parsing, and a warning is displayed to inform the user that empty triggers are not allowed and have been ignored. This prevents the buggy behavior while giving clear feedback to users who might have accidentally left triggers empty or were trying to disable specific matches. Fixes espanso#1616
Collaborator
|
You sir are lit this weekend 🔥 🔥 |
Contributor
Author
|
To be honest, I have only some lower-intermediate Python knowledge and I don’t know Rust, so my skills are quite limited. |
Collaborator
|
Don't worry! I accept contributions of all levels. So far you did great! doesn't matter from what the tooling. If you are interested in rust, there is no better place than the rust book. There aren't even better paid courses! |
sboldt1978
pushed a commit
to sboldt1978/espanso
that referenced
this pull request
Feb 11, 2026
…#1616) (espanso#2508) * Fix subcommand help displaying main help instead of specific help (espanso#2483) When running commands like `espanso service --help` or `espanso package --help`, the CLI was displaying the main application help instead of the specific subcommand help. This was caused by using `clap_instance.print_help()` which always prints the root command help, instead of using `err.exit()` which properly handles contextual help for subcommands. Fix: Use `err.exit()` to let Clap handle contextual help display. Fixes espanso#2483 * Fix empty triggers causing expansion on every word separator (espanso#1616) When a trigger was set to an empty string (""), it would expand on every word separator, causing unexpected text replacements. Now empty triggers are filtered out during configuration parsing, and a warning is displayed to inform the user that empty triggers are not allowed and have been ignored. This prevents the buggy behavior while giving clear feedback to users who might have accidentally left triggers empty or were trying to disable specific matches. Fixes espanso#1616
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
When a trigger was set to an empty string (""), it would expand on every word separator, causing unexpected text replacements.
Now empty triggers are filtered out during configuration parsing, and a warning is displayed in the logs to inform that empty triggers are not allowed and have been ignored.
Fixes #1616