-
Notifications
You must be signed in to change notification settings - Fork 496
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
shell command in api #2295
Comments
Does the [[manager.prepend_keymap]]
on = [ "f", "f" ]
run = """
shell --block '
<the_script>
'
""" |
That works wonderfully! Sorry to bother you more, but if you have time maybe you can tell me how I can achieve the same from lua too? If I want user-input, confirmation etc, I would think that is where I should put it...?
I managed to execute the script, but not display output while it run. How would I do that in the lua? The absolute best would be if I could run it in the background and open the progress from the task-window and look at the output(progressbar and such), but that is just extra. A blocking shell window is more than good enough really. Again thank you for being so helpful! |
I'm not quite sure I understand what you mean. If you want it to run in the background, just remove If you want to emit a ya.manager_emit("shell", { block = true, "<the_script>" }) Doc of Although, I don't really see why you would need a plugin for this. |
Hello. Ill try explain why I (think I) need it in plugin again.. Thanks again |
yazi --debug
outputPlease describe the problem you're trying to solve
I want to make a plugin where I call a custom shell script and I want to display the output in real time like I run it from the shell.
(basicly a wrapper around ffmpeg that handles single or multiple files and displays a progress bar of each file and the total progress)
I tried multiple ways. i.e. using
io.open
/os.execute
("sh -c '<some script> arg1 arg2 ... argx'")
The script gets executed, but I cant find a way to get the output.
Am I missing a more obvious method?
This is very straight forward using lf and it holds me back to transit completely to yazi...
(
)
Would you be willing to contribute this feature?
Describe the solution you'd like
A lua function that starts and displays a shell with a given command
Additional context
No response
Checklist
The text was updated successfully, but these errors were encountered: