Skip to content

Commit

Permalink
fix the print
Browse files Browse the repository at this point in the history
  • Loading branch information
gogonzo committed Dec 20, 2024
1 parent 12360f7 commit d60755c
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions R/qenv-show.R
Original file line number Diff line number Diff line change
Expand Up @@ -27,9 +27,15 @@ setMethod("show", "qenv", function(object) {
cat(cli::style_bold(paste0(header, locked)), sep = "\n")
cat(parent, "\n")

shown <- vapply(rlang::syms(ls(object)), deparse, character(1L), backtick = TRUE)
shown <- ls(object)
lapply(shown, function(x) {
cat(sprintf("- %s: [%s]\n", x, class(object[[x]])[1]))
cat(
sprintf(
"- %s: [%s]\n",
deparse(rlang::sym(x), backtick = TRUE),
class(object[[x]])[1]
)
)
})

hidden <- setdiff(ls(object, all.names = TRUE), shown)
Expand Down

0 comments on commit d60755c

Please sign in to comment.