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 flag for subcommand view: -p/--pure #138

Closed
Jedsek opened this issue Aug 20, 2022 · 4 comments · Fixed by #140
Closed

Add a flag for subcommand view: -p/--pure #138

Jedsek opened this issue Aug 20, 2022 · 4 comments · Fixed by #140

Comments

@Jedsek
Copy link
Contributor

Jedsek commented Aug 20, 2022

I want to get the pure content (print it directly)

@Jedsek
Copy link
Contributor Author

Jedsek commented Aug 20, 2022

This is very useful when use pipeline or something similar

@Ninjani
Copy link
Member

Ninjani commented Aug 23, 2022

Do you mean without the ANSI color codes? This should happen automatically in a pipeline setting - it detects if the terminal is in TTY mode and if it's not then it doesn't colorize.

Do you have a situation where this didn't work correctly?

@Jedsek
Copy link
Contributor Author

Jedsek commented Aug 24, 2022

@Ninjani
Yeah, without any color codes.
I think it should be configurable for users, just this reason.

For example:
I use a editor, this editor could execute some linux commands whose output will be insert into the file.

I execute the-way view 1 to insert the output, but the output includes some color codes so that I have to delete these color codes. I just want to get the content of snippet.

I will be so happy if it has a option -p/--pure. :)

Ninjani added a commit that referenced this issue Aug 24, 2022
@Ninjani Ninjani mentioned this issue Aug 24, 2022
@Ninjani
Copy link
Member

Ninjani commented Aug 24, 2022

Added, will push a new release

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

Successfully merging a pull request may close this issue.

2 participants