out-of-cheese-error / the-way

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

--stdout short flag -s or use standard output as the default instead of the clipboard #122

Closed jgarte closed 2 years ago

jgarte commented 2 years ago

Hi,

What do you think of having a short flag for --stdout?

I'd prefer to just have to type -s or any other single character to specify standard output.

I'd also prefer for standard output to be the default instead of clipboard.

WDYT?

Ninjani commented 2 years ago

Sure, I'll add -s. Not sure about the having stdout as default, I use clipboard more often and using stdout would only make sense in combination with a different command (such as the shell variants here).

jgarte commented 2 years ago

The reason it benefits me to have standard output as the default is because I'm using the text editor vis which allows me to easily pipe text into the editor with the < and | operators.

For example I could run something like the following in vis' command mode to give a quick contrived example:

:<ls -a

The above would send the standard output of ls -a directly into my editor very easily.

I'd currently do something similar with the-way by just typing :<the-way search.

I think -s would be definitely an improvement. I can also alias it to something shorter.

I currently have an alias for the-way search --stdout set to tw so I can run the following in vis:

:<tw