X-Git-Url: http://lists.indexdata.dk/cgi-bin?a=blobdiff_plain;f=shell.tcl;h=02f6b92f01ba0d220d2a7f9286fe304258df8cc4;hb=ac2136c8caf1f2a8c6f458cd1775e9bf1c18aa71;hp=5fc0415844b8b3489fca5d5bc1cb83dffe70c87d;hpb=8af4265740ee668a449d31abc97f60aabe0c497d;p=ir-tcl-moved-to-github.git diff --git a/shell.tcl b/shell.tcl index 5fc0415..02f6b92 100644 --- a/shell.tcl +++ b/shell.tcl @@ -1,4 +1,4 @@ -# $Id: shell.tcl,v 1.5 1998-05-20 12:27:45 adam Exp $ +# $Id: shell.tcl,v 1.6 1999-03-22 06:51:34 adam Exp $ # if {[catch {ir-log-init all irtcl shell.log}]} { @@ -21,6 +21,7 @@ proc help {} { puts " base " puts " format " puts " find " + puts " sort " puts " show " puts "" } @@ -82,6 +83,13 @@ proc find-response {z} { common-response $z 1 } +proc sort-response {z} { + global ok + set sstatus [$z sortStatus] + puts "Sort Status: $sstatus" + set ok 1 +} + proc common-response {z from} { global ok pref @@ -145,3 +153,13 @@ proc find {query} { return {} } +proc sort {query flags} { + global ok pref + + set ok 0 + z callback {sort-response z.1} + z.1 sort "$query $flags" + vwait ok + return {} +} +