Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

menupick no longer prompts user to select from empty menu

  • Loading branch information...
commit d04587559ce9a506b2a741f04548485e2d194eba 1 parent 0539156
Mark Dominus authored
Showing with 6 additions and 0 deletions.
  1. +6 −0 menupick
View
6 menupick
@@ -5,6 +5,12 @@ my $opt = { 1 => 0, n => 30 };
getopts('1n:', $opt) or usage();
chomp(my @item = <>);
+
+unless (@item) {
+ warn "No items supplied to menupick\n";
+ exit;
+}
+
open my($ttyin), "<", "/dev/tty"
or do { warn "No tty: $!\n"; exit 1 };
open my($ttyout), ">", "/dev/tty"
Please sign in to comment.
Something went wrong with that request. Please try again.