[Rd] Querying from R if '--quiet' had been set

Dirk Eddelbuettel edd @end|ng |rom deb|@n@org
Fri Jun 27 19:23:24 CEST 2025


Thanks to Martin for additional off-list discussion; this is now addressed
'both ways' as I did file bug report #18913 with the short patch but also
have a short check in .Rprofile serving the same purpose:

    ## interactive sessions get a fortune cookie (needs fortunes package)
    quiet <- any(!is.na(match(c("-q", "--quiet"), commandArgs())))
    if (interactive() && !quiet && requireNamespace("fortunes", quietly=TRUE))
        print(fortunes::fortune())

This could be made a little better with #18913 to provide quiet() but already
works.  Now, when I use '-q' in startup no fortune is shown as desired.

Cheers, Dirk

-- 
dirk.eddelbuettel.com | @eddelbuettel | edd using debian.org



More information about the R-devel mailing list