-
Notifications
You must be signed in to change notification settings - Fork 14
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
if file has no extension use output of file command #49
Comments
Next time, please search through the documentation/issues before creating a new post - you can do better 👍 |
sorry. missed the last part of the init.lua since I wasn't interested in custom filenames/folder, so missed the last bit. curious why this defaults to false and not true. seems to me the difference in speed when needing to do the file lookup after no match would be negligible. |
Its name When users use it on network devices, it won't accidentally download files with unrecognized extensions, since those unrecognized files aren't necessarily small files. |
Understand but not clear/obvious. Might make a small change to the README saying that by default, this changes yazi behavior to ONLY rely on extensions. If the user wishes to have this plugin use the yazi file method if the extension doesn't match soemthing that plugin supports, see the Advanced example below |
I'd appreciate a PR for that |
What system are you running Yazi on?
Linux Wayland
What terminal are you running Yazi in?
ptyxis or wezterm
yazi --debug
outputDescribe the bug
I have a shell script in a file with no extension. When I this plugin I don't get a preview but merely :
A header line that says file type classification and then a line that says
POSIX shell script, Unicode text, UTF-8 text, executable
If I disable the extension I get a preview of the file. I think the code here should look for a match and then if not use the file command, as yazi does, to determine the mime type. When I disable the extension yazi does display a preview.
Minimal reproducer
create a bash shell script in a file without an extension.
Anything else?
No response
The text was updated successfully, but these errors were encountered: