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

add a decorations alias #1108

Closed
lyndell opened this issue Jul 16, 2020 · 9 comments
Closed

add a decorations alias #1108

lyndell opened this issue Jul 16, 2020 · 9 comments
Labels
feature-request New feature or request good first issue Good for newcomers

Comments

@lyndell
Copy link

lyndell commented Jul 16, 2020

An alias for --decorations always so I can pipe the decorations when doing something like bat FILE | gview -. …but without the ^M's.

@lyndell lyndell added the feature-request New feature or request label Jul 16, 2020
@sharkdp
Copy link
Owner

sharkdp commented Jul 25, 2020

Sounds good to me. Which flag would you suggest? You also want colors to be enabled, right? (not just grid, line numbers, changes).

@sharkdp sharkdp added the good first issue Good for newcomers label Jul 25, 2020
@lyndell
Copy link
Author

lyndell commented Jul 26, 2020

-d appears available. Colors could be a problem in gview or text/plain MIME type, though it might be nice for someone dumping to monospace HTML. Maybe use -h or --html for an HTML dump with colors. Grid and line numbers would be fine for a pretty-print cat or head alternative. bat FILE | gview - is the use-case time I would use.

@sharkdp
Copy link
Owner

sharkdp commented Jul 26, 2020

Colors could be a problem in gview or text/plain MIME type, though it might be nice for someone dumping to monospace HTML. Maybe use -h or --html for an HTML dump with colors.

How is this related to the feature in question here? We are not planning to add a HTML output feature to bat. Note that there are thing like ansi2html.

Maybe I don't yet understand your use case. What do you use … | giew - for? Is bats paging option not working for you?

@lyndell
Copy link
Author

lyndell commented Jul 26, 2020

gviewis an excellent file viewer, especially when I want to break out of the Terminal window. Concatenating the files with bat decorations makes the distinct file and line numbers clear. One example is viewing Kubernetes with bat pod.yaml deployment.yaml service.yaml | gview -. There are times I'd rather use that in stead of -o or -Oongview`. It makes the search and navigation easier.

@alexanderkarlis
Copy link
Contributor

I was hoping to give this issue a shot. But I noticed that there already is an alias flag for -d (diff). Would it be a good idea to add it as -D instead of -d? @sharkdp

@lyndell
Copy link
Author

lyndell commented Aug 9, 2020

Sounds good to me.

@sharkdp
Copy link
Owner

sharkdp commented Aug 15, 2020

If this enables --color=always and --decorations=always, we could also use -c, as the major thing (for me) would be the colorized output, not the decorations.

@sharkdp
Copy link
Owner

sharkdp commented Sep 14, 2020

Closed via #1141 by @alexanderkarlis

@sharkdp sharkdp closed this as completed Sep 14, 2020
@sharkdp
Copy link
Owner

sharkdp commented Oct 2, 2020

Released in v0.16.0.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature-request New feature or request good first issue Good for newcomers
Projects
None yet
Development

No branches or pull requests

3 participants