out-of-cheese-error / the-way

A code snippets manager for your terminal.
MIT License
355 stars 16 forks source link

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

Closed Jedsek closed 2 years ago

Jedsek commented 2 years ago

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

Jedsek commented 2 years ago

This is very useful when use pipeline or something similar

Ninjani commented 2 years ago

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 commented 2 years ago

@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 commented 2 years ago

Added, will push a new release