-
Notifications
You must be signed in to change notification settings - Fork 395
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
Toggle yazi and terminal #1951
Comments
I haven't used Midnight Commander myself. Could you explain in more detail what this feature is like? It would be really helpful if there's a video demo. |
This is what I meant: mc_terminal_toggle.mp4You can enter commands and switch to the terminal nothing is blocked. If you switch to the terminal you can run other commands. |
This is really interesting! I never thought about using shells like this. But integrating it into Yazi might not be trivial, I have a few questions:
|
The |
Thanks for the explanation, but I'm still confused about the following questions:
|
For most of the questions you have I do not know the answer I did not study the repository for |
Regarding the commands runI went throught the code. The bottom function they use is /* --------------------------------------------------------------------------------------------- */
/**
* Wrapper for execvp() system call.
*/
int
my_execvp (const char *file, char *const argv[])
{
return execvp (file, argv);
} It is located in file mc/lib/utillinux.c The file is the command It is called via fork in the same file in function case FORK_CHILD:
{
my_signal (SIGINT, SIG_DFL);
my_signal (SIGQUIT, SIG_DFL);
my_signal (SIGTSTP, SIG_DFL);
my_signal (SIGCHLD, SIG_DFL);
my_execvp (command, argv);
my_exit (127); /* Exec error */
}
MC_FALLTHROUGH;
/* no break here, or unreachable-code warning by no returning my_exit() */ SubshellThe main code is in int
invoke_subshell (const char *command, int how, vfs_path_t **new_dir_vpath) They split the flow into 2 sections when the user hits C-o and when the user enters the command in the bottom line. |
I would be up to helping you to implement the stuff, but I do not know rust. |
I have some difficulty reading the MC code because I don't know C, especially for such a large project. Could you write a minimal demo for me in a language you're familiar with, like C or Python, so that I can have ChatGPT explain it to me? |
I do not have much time now. If I have time, I will do it during the weekend. It will probably be easiest in C. |
yazi --debug
outputPlease describe the problem you're trying to solve
Let's say you want to be in one tab and run the program you wrote. That will block Yazi until the program finishes the execution. If I want to see the output, there is no way to do so. I could also change to a different directory in the second tab to do other stuff there while the program runs in the first tab.
Would you be willing to contribute this feature?
Describe the solution you'd like
I would like to have something similar to what is in Midnight Commander. After invoking a keymap a terminal and its output will be displayed. Running a code in the terminal will not block yazi.
Additional context
No response
Validations
The text was updated successfully, but these errors were encountered: