Browse Source

punk::ns display fix

master
Julian Noble 12 months ago
parent
commit
a317ca047a
  1. 31
      src/modules/punk/ns-999999.0a1.0.tm

31
src/modules/punk/ns-999999.0a1.0.tm

@ -828,12 +828,13 @@ namespace eval punk::ns {
} else {
set width [textblock::width $block]
}
if {$width > 0} {
#if multiple results or if there is only 1 result - but we are path-globbing - then we need to show location
if {$count_with_results > 1 || [regexp {[*?]} [nsprefix $ns_absolute]]} {
append output \n [dict get $nsdict location] \n
append output $block
if {$count_with_results > 1} {
append output \n [string repeat - $width]
}
}
append output $block
if {$count_with_results > 1 } {
append output \n [string repeat - $width]
}
}
return $output
@ -1009,17 +1010,21 @@ namespace eval punk::ns {
set imported $allimported
set undetermined $allundetermined
}
#itemcount will overcount if we are including commands as well as procs/exported etc -
set itemcount 0
incr itemcount [llength $tailmatches]
incr itemcount [llength $commands]
incr itemcount [llength $procs]
incr itemcount [llength $exported]
incr itemcount [llength $imported]
incr itemcount [llength $aliases]
incr itemcount [llength $ensembles]
incr itemcount [llength $ooobjects]
incr itemcount [llength $ooclasses]
incr itemcount [llength $exportpatterns]
#incr itemcount [llength $procs]
#incr itemcount [llength $exported]
#incr itemcount [llength $imported]
#incr itemcount [llength $aliases]
#incr itemcount [llength $ensembles]
#incr itemcount [llength $ooobjects]
#incr itemcount [llength $ooclasses]
#definitely don't count exportpatterns
incr itemcount [llength $undetermined]
lappend nsdict_list [dict create\

Loading…
Cancel
Save