jarun / googler

:mag: Google from the terminal
GNU General Public License v3.0
6.11k stars 529 forks source link

fixed stdin for piped commands #371

Closed worthless443 closed 4 years ago

worthless443 commented 4 years ago

Added stdin.read() check if no opts.keywords are not given. To be well used for echo googler | googler

zmwangx commented 4 years ago

Late reply, but if you really need this you'll have to check stdin isn't a tty first (sys.stdin.isatty()). But I'd recommend command substitution, probably assigning to a variable first.