Skip to content

Commit

Permalink
Added basic support for pipe usage. (example: echo "keyword" | youtub…
Browse files Browse the repository at this point in the history
…e-viewer)
  • Loading branch information
Daniel Șuteu committed Jul 20, 2013
1 parent 402f682 commit f71a277
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions WWW-YoutubeViewer/bin/youtube-viewer
Expand Up @@ -1185,6 +1185,9 @@ if (my @keywords = grep chr ord ne q{-}, @ARGV) {
elsif (-t and $opt{interactive}) {
first_user_input();
}
elsif (-t STDOUT and not -t STDIN) {
print_videos($yv_obj->search(<>));
}
else {
main_quit($opt{_error});
}
Expand Down

0 comments on commit f71a277

Please sign in to comment.