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 prompt if arguments are empty #5

Merged
merged 1 commit into from
Jul 7, 2023

Conversation

fxrs
Copy link
Contributor

@fxrs fxrs commented Mar 28, 2023

Hey,

I'd like to propose this change to add an user prompt if no arguments were given.
This gives a convenient option for requests while also preventing filling the shell history with every request.

I typically use ctrl-r to retrieve a previous rusty command, but to make a new request, I need to clear the arguments. Executing rusty commands with arguments should not be affected.

Both cargo fmt and cargo clippy ran successfully from what I can tell. Commit allows fast-forward merging onto main branch.

Please review and let me know if you have any comments or suggestions.

Cheers,
Felix

@fxrs
Copy link
Contributor Author

fxrs commented Mar 29, 2023

This also allows reading from file (rusty < test.txt) as well as running it on a selection in vim (eg. make selection, :'<,'>w ! rusty).

@zahidkhawaja zahidkhawaja self-assigned this Jul 7, 2023
@zahidkhawaja
Copy link
Owner

Thanks, @fxrs! Great idea.

@zahidkhawaja zahidkhawaja merged commit 9ac3c8d into zahidkhawaja:main Jul 7, 2023
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 this pull request may close these issues.

2 participants