Permalink
Browse files

Added basic support for pipe usage. (example: echo "keyword" | youtub…

…e-viewer)
  • Loading branch information...
1 parent 402f682 commit f71a277433ef9fafba6f003ce9e89f391ab8807a @trizen committed Jul 20, 2013
Showing with 3 additions and 0 deletions.
  1. +3 −0 WWW-YoutubeViewer/bin/youtube-viewer
@@ -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});
}

0 comments on commit f71a277

Please sign in to comment.