|
2024-11-12
| ||
| 23:19 | • Closed ticket [ac104c9ecb]: lsearch -index help page plus 5 other changes artifact: 6eb1c04f60 user: jan.nijtmans | |
| 15:00 | • Ticket [ac104c9ecb]: 3 changes artifact: 1417b3a483 user: pooryorick | |
| 07:04 | • Ticket [ac104c9ecb]: 3 changes artifact: 33440e38dc user: juliannoble2 | |
|
2024-11-10
| ||
| 22:26 | Merge [17a6f70fc12918dd]: Fix for documentation issue [ac104c9ecb]: Make "-index" example more illus... check-in: 9bc96cb8de user: pooryorick tags: unchained, INCOMPATIBLE_LICENSE | |
|
2024-11-08
| ||
| 11:19 | • Ticket [ac104c9ecb] lsearch -index help page status still Open with 4 other ... artifact: 36bcd411f2 user: pooryorick | |
| 11:16 | Fix for documentation issue [ac104c9ecb]: Make "-index" example more illustrative. check-in: 17a6f70fc1 user: pooryorick tags: trunk, main | |
|
2024-03-20
| ||
| 08:16 | • New ticket [ac104c9ecb] lsearch -index help page. artifact: 0d873e05e6 user: anonymous | |
lsearch -index help page
Closed / Fixedac104c9ecbb4066f9694fdba421d46dce67bb7c2Created 3 years agoUpdated 2 years ago
Descriptionplain2024-03-20 08:16:03
I think the example given here (https://www.tcl.tk/man/tcl8.6/TclCmd/lsearch.htm#M26) is not the right one, because with or without the '-index' option, the result is the same.
lsearch -index 1 -all -inline {{a abc} {b bcd} {c cde}} *bc*
> {a abc} {b bcd}
lsearch -all -inline {{a abc} {b bcd} {c cde}} *bc*
> {a abc} {b bcd}
Tested with versions: 8.6.14 and 9.0b1
Referenced by2
9bc96cb8deMerge [17a6f70fc12918dd]: Fix for documentation issue [ac104c9ecb]: Make "-index" example more illustrative. check-in2024-11-10 22:26:5417a6f70fc1Fix for documentation issue [ac104c9ecb]: Make "-index" example more illustrative. check-in2024-11-08 11:16:36
pooryorickwiki2024-11-08 11:19:13
Fixed in [17a6f70fc1]. Someone might want to backport the fix as well.
juliannoble2plain2024-11-12 07:04:37
I think the original example for the -stride version was wrong too.
The result is just a list - and shouldn't show as braced, as none of the earlier lsearch examples have an extra level of bracing for a list result.
lsearch -stride 2 -index 1 -all -inline {a abc b bcd c cde} *bc*
-> {a abc b bcd}
Updated version should just be:
lsearch-stride 2 -index 1 -all -inline {abc abc abc bcd abc cde} *bc*
-> abc abc abc bcd
pooryorickwiki2024-11-12 15:00:08
Fixed in [37bcceec1e]. Thanks for catching that.
jan.nijtmanswiki2024-11-12 23:19:07
Now merged to all branches, so can be closed.
Thanks!
Log in (anonymous is fine) to add a comment.