projects
/
ir-tcl-moved-to-github.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Bump version to 1.4.3
[ir-tcl-moved-to-github.git]
/
shell.tcl
diff --git
a/shell.tcl
b/shell.tcl
index
5fc0415
..
9b64f68
100644
(file)
--- 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.8 2002-03-21 11:11:53 adam Exp $
#
if {[catch {ir-log-init all irtcl shell.log}]} {
#
if {[catch {ir-log-init all irtcl shell.log}]} {
@@
-21,6
+21,7
@@
proc help {} {
puts " base <base>"
puts " format <format>"
puts " find <query>"
puts " base <base>"
puts " format <format>"
puts " find <query>"
+ puts " sort <attr> <flag>"
puts " show <offset> <number>"
puts ""
}
puts " show <offset> <number>"
puts ""
}
@@
-76,12
+77,23
@@
proc find-response {z} {
if {$sstatus} {
set h [$z resultCount]
puts "Search ok. $h hits"
if {$sstatus} {
set h [$z resultCount]
puts "Search ok. $h hits"
+ set terms [$z searchResult]
+ foreach tc $terms {
+ puts "[lindex $tc 0]: [lindex $tc 1]"
+ }
} else {
puts "Search failed"
}
common-response $z 1
}
} else {
puts "Search failed"
}
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
proc common-response {z from} {
global ok pref
@@
-145,3
+157,13
@@
proc find {query} {
return {}
}
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 {}
+}
+