-
Notifications
You must be signed in to change notification settings - Fork 19
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
Allow explicitly specifying filetype #134
Comments
Hello! Regarding JSON, I think piping through echo '{"url":"https://github.com/walles/riff"}' | jq -C | moar Except for JSON, what other file types do you tend to read from scripts? |
well, that'd be mostly it, thanks for the jq hack, although one example I can think of are OpenRC service files, which use shell script syntax, but have no file extensions. Same goes for some scripts that are added to Some markdown, yaml or config files may also not always have an extension. |
Except for JSON, how often have you actually been missing this? Enough that you'd have manually specified a MIME type on the command line? This could be implemented, but I'm unsure how much use it would actually see. |
Just released v1.21.0 where you can use the |
Even better, in this release JSON coming from pipes is auto detected and highlighted accordingly: |
We all often pipe something from STDOUT to a pager. The output can often be in a json format (e.g. from a logger) or a shell script (though I'm not sure if moar simply looks for a shebang in such instances, since many script files don't necessarily contain an extension), and therefore it'd be really useful if instead of first writing the output to a temporary file or rename the files, be able to explicitly set the filetype in moar, similar to using
set ft
in Vim.The text was updated successfully, but these errors were encountered: