replace all non-word characters with wordify#166
Conversation
Use the regular expression set \W to replace all non-word characters instead of the fixed set [-.\s:] in wordify. Add a test for subcommands containing slashes in their name as an example. This could be tested more robustly.
|
Actually I just noticed this does not work in bash (though does in zsh) for commands with slashes in them, as noted in #165. I'm not yet sure if this is something that could be fixed in the generated bash completion script or is a limit of bash itself. |
|
It looks like the weird command issue I was seeing was due to a conflict with the |
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #166 +/- ##
=======================================
Coverage 88.88% 88.88%
=======================================
Files 3 3
Lines 360 360
=======================================
Hits 320 320
Misses 40 40 ☔ View full report in Codecov by Sentry. |
Use the regular expression set
\Wto replace all non-word characters instead of the fixed set[-.\s:]inwordify. I also added a test for subcommands containing slashes in their name as an example. This could be tested more robustly, though that would require more knowledge of some shell completion internals than I currently have.Closes #165