Browse Source

punk::ns display fix

master
Julian Noble 2 years ago
parent
commit
a317ca047a
  1. 25
      src/modules/punk/ns-999999.0a1.0.tm

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

@ -828,14 +828,15 @@ namespace eval punk::ns {
} else { } else {
set width [textblock::width $block] 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 \n [dict get $nsdict location] \n
}
append output $block append output $block
if {$count_with_results > 1 } { if {$count_with_results > 1 } {
append output \n [string repeat - $width] append output \n [string repeat - $width]
} }
} }
}
return $output return $output
} }
#cli command - impure - relies on caller/ns_current #cli command - impure - relies on caller/ns_current
@ -1009,17 +1010,21 @@ namespace eval punk::ns {
set imported $allimported set imported $allimported
set undetermined $allundetermined set undetermined $allundetermined
} }
#itemcount will overcount if we are including commands as well as procs/exported etc -
set itemcount 0 set itemcount 0
incr itemcount [llength $tailmatches] incr itemcount [llength $tailmatches]
incr itemcount [llength $commands] incr itemcount [llength $commands]
incr itemcount [llength $procs]
incr itemcount [llength $exported]
incr itemcount [llength $imported] #incr itemcount [llength $procs]
incr itemcount [llength $aliases] #incr itemcount [llength $exported]
incr itemcount [llength $ensembles] #incr itemcount [llength $imported]
incr itemcount [llength $ooobjects] #incr itemcount [llength $aliases]
incr itemcount [llength $ooclasses] #incr itemcount [llength $ensembles]
incr itemcount [llength $exportpatterns] #incr itemcount [llength $ooobjects]
#incr itemcount [llength $ooclasses]
#definitely don't count exportpatterns
incr itemcount [llength $undetermined] incr itemcount [llength $undetermined]
lappend nsdict_list [dict create\ lappend nsdict_list [dict create\

Loading…
Cancel
Save