Skip to content

Commit

Permalink
Initial Commit.
Browse files Browse the repository at this point in the history
Currently Enumerates the Results up to and including ( and on over ) n.

Command line arguments don't vork.
  • Loading branch information
psycotica0 committed Dec 2, 2008
0 parents commit 056d9e2
Showing 1 changed file with 35 additions and 0 deletions.
35 changes: 35 additions & 0 deletions menu.tcl
@@ -0,0 +1,35 @@

#This reads in the command line arguments and sets options.
proc commandLine {args} {
global options
set options(n) 10
set options(c) "vim"

foreach {arg value} $args {
if {[string equal $arg "-c"]} {
set options(c) $value
} elseif {[string equal $arg "-n"]} {
set options(n) $value
} else {
puts "Don't Recognize Argument $arg"
}
}
}

commandLine $argv

set COMMANDS [list]

for {set i 0} {$i<$options(n)} {incr i} {
if {[eof stdin]} {
break
}
set line [gets stdin]
lappend COMMANDS $line
puts "$i- $line"
}

puts "Choice: "
set r [gets stdin]

puts "Choice was $r"

0 comments on commit 056d9e2

Please sign in to comment.