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

Tracking issue: improved UX #149

Open
alexpovel opened this issue Oct 19, 2024 · 0 comments · May be fixed by #155
Open

Tracking issue: improved UX #149

alexpovel opened this issue Oct 19, 2024 · 0 comments · May be fixed by #155

Comments

@alexpovel
Copy link
Owner

alexpovel commented Oct 19, 2024

See #145 : UX around the replacement action could be improved. I suspect srgn is mainly useful as a ripgrep-like search tool. Hence, replacement could become its own option, just like all other actions (currently replacement is a positional argument), without breaking too many workflows, or incurring too much "typing effort". It would break tr-like behavior:

srgn/README.md

Line 1866 in 1b27825

## Comparison with `tr`

deviating from that compatibility a slight bit, but it might be a niche use case anyway. I don't know.

Alternatively, we could use https://docs.rs/clap/latest/clap/struct.Arg.html#method.last , which would turn into usage such as:

$ echo "Hello a" | srgn a -- b
Hello b

aka -- becomes mandatory, and replacement can be no longer be accidentally inserted into surprising spots, as in #145 . That seems like a neat middle ground, but if we break backwards compatibility anyway, might as well streamline all actions to be given as options throughout (and stop treating replacement specially).

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

Successfully merging a pull request may close this issue.

1 participant