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

Previewer script stealing focus resulting in lf hanging #1696

Open
avidseeker opened this issue Apr 23, 2024 · 2 comments
Open

Previewer script stealing focus resulting in lf hanging #1696

avidseeker opened this issue Apr 23, 2024 · 2 comments

Comments

@avidseeker
Copy link

In a previewer script, use the following previewer for zipped files:

atool -l

Then try previewing an encrypted zip or 7z file. Since atool -l prompts for a password, it will wait for that password to be input and the result is lf hanging. The way scripts like ranger scope.sh avoid this is by providing an empty password like this:

        rar)
            ## Avoid password prompt by providing empty password
            unrar lt -p- -- "${FILE_PATH}" && exit 5
            exit 1;;
        7z)
            ## Avoid password prompt by providing empty password
            7z l -p -- "${FILE_PATH}" && exit 5
            exit 1;;

Despite this, I don't think it is the right behavior for a previewer to read input, and lf shouldn't hang when a previewer requests user interaction.

@og900aero
Copy link

The best solution would be if lf could redirect these requests to their own interface, or open a TUI window for this separately (like yazi) where they would request the data. This would solve several problems (such as sudo).
I would really like to see this further developed.

@saram-aman
Copy link

@avidseeker please assign the task to me!

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

No branches or pull requests

3 participants