[Sciviews-commits] r31 - pkg/svMisc/R

noreply at r-forge.r-project.org noreply at r-forge.r-project.org
Tue Jul 1 01:15:42 CEST 2008


Author: romain
Date: 2008-07-01 01:15:42 +0200 (Tue, 01 Jul 2008)
New Revision: 31

Modified:
   pkg/svMisc/R/CompletePlus.R
Log:
added a column to the output for clarity

Modified: pkg/svMisc/R/CompletePlus.R
===================================================================
--- pkg/svMisc/R/CompletePlus.R	2008-06-30 23:06:01 UTC (rev 30)
+++ pkg/svMisc/R/CompletePlus.R	2008-06-30 23:15:42 UTC (rev 31)
@@ -6,12 +6,12 @@
     if (nchar(token, type = "chars") < minlength) return(invisible(NULL))
     utils:::.completeToken()
     comps <- utils:::.retrieveCompletions()
-    out <- matrix( "", nrow = length(comps), ncol = 2 )
+    out <- matrix( "", nrow = length(comps), ncol = 3 )
     out[,1] <- comps
     
     ### deal with packages (completions ending with ::)
     if(length(test.pack <- grep("::", comps) )){
-      out[ test.pack,2] <- sapply( sub("::", "", comps[test.pack]), packageDescription, fields = "Description"  ) 
+      out[ test.pack,3] <- sapply( sub("::", "", comps[test.pack]), packageDescription, fields = "Description"  ) 
     }
     
     ### deal with argument completions (ending with =)
@@ -20,9 +20,10 @@
       fguess <- utils:::.CompletionEnv[["fguess"]]
       pack <- sub( "^package:", "", find( fguess )[1] )
       if(pack == ".GlobalEnv" ) {
-        out[ test.arg,2] <- ""
+        out[ test.arg,3] <- ""
       } else{
-        out[ test.arg,2] <- paste( "[", fguess, "] ", .extract_argument_description( pack, fguess, arg), sep = "" )
+        out[ test.arg,2] <- fguess
+        out[ test.arg,3] <- .extract_argument_description( pack, fguess, arg)
       }
     }
     
@@ -48,7 +49,8 @@
           })
         }
       }
-      out[ test.fun, 2 ] <- desc.fun
+      out[ test.fun, 2 ] <- packs
+      out[ test.fun, 3 ] <- desc.fun
     }
     
     out



More information about the Sciviews-commits mailing list