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
fix(quit): allow to quit atac inside selected requests #50
base: main
Are you sure you want to change the base?
fix(quit): allow to quit atac inside selected requests #50
Conversation
Hello @NachoNievaG I understand what is your problem, but I found another problem with what you did. On platforms such as Windows or many Linux distros, ctrl-c is used to copy text from the terminal. Imagine that I want to manually copy the request URL onto my clipboard, with your code it will exit the app (without even copying the text). If you find another way, let me know! I'll try to think about that in "passive" mode Have a great day!!! |
src/app/app_states.rs
Outdated
@@ -261,6 +261,7 @@ impl AppState { | |||
}; | |||
|
|||
let mut base_events: Vec<AppEvent> = vec![ | |||
ExitApp(EventKeyBinding::new(vec![key_bindings.main_menu.exit, key!(ctrl-c)], "Exit", Some("Exit"))), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
On platforms such as Windows or many Linux distros, ctrl-c is used to copy text from the terminal. Imagine that I want to manually copy the request URL onto my clipboard, with your code it will exit the app (without even copying the text).
Oops, you are right, I'm still not used to think of this as a multi-platform bin.
wouldn't this be enough?
ExitApp(EventKeyBinding::new(vec![key_bindings.main_menu.exit, key!(ctrl-c)], "Exit", Some("Exit"))), | |
ExitApp(EventKeyBinding::new(vec![key_bindings.main_menu.exit], "Exit", Some("Exit"))), |
37736b8
to
95d8e06
Compare
@NachoNievaG I took some time to think of something that could resolve your problem without needing a special implementation, and I think I found it! One of the next features that I will work on will be command line usage. As we discussed it a little on the import curl PR, I will try to make it very complete. E.g. regarding your problem, you could send a request with atac send my_collection/my_request By default it will return the response body. But by adding things like Back to your problem, you could simply copy the output from the command line usage. What about that? Have a great day! |
@Julien-cpsn In a "fast" workflow as soon as i get the output i would like to be able to quit the program/floating term. Natural TUI exampleScreen.Recording.2024-05-06.at.17.36.13.movNeovim Plugin exampleScreen.Recording.2024-05-06.at.17.29.13.movMaybe i'm not using the software as intended to be. |
Proposal
I always find myself executing a request, copying the result, and trying to quit as soon as i copy the result.
But currently quitting with
q
only works in the "normal" view, so quitting requiresctrl+c
orEsc -> q
.With this, you will be able to quit using
q
on a selected request.Thanks!