Re: [R] Remove entry with sensitive information from history

2015-05-28 Thread Luca Cerone
Thanks to you all for your help! I see Brian's answer as good when I want to prompt the user for a password (when they set the profile for example) and I would like to know how to mask the input there. Henrik's answer seems the closest to what I would like to achieve, but you are right if they as

Re: [R] Remove entry with sensitive information from history

2015-05-27 Thread Henrik Bengtsson
To answer your question on filtering the command-line history: You can use savehistory()/loadhistory() to rewrite the history, but like all other solutions/suggestions, it's not guaranteed to work everywhere. Example: filterhistory <- function(filter) { stopifnot(is.function(filter)) hf <- tem

Re: [R] Remove entry with sensitive information from history

2015-05-27 Thread Prof Brian Ripley
On 27/05/2015 09:17, Luca Cerone wrote: Hi David, thanks, but the function has to work from an R shell, I have no graphical server in my remote machines. My suggestion was going to be to use readline() to read the passwords. Ideally one would use a custom reader from stdin which did not echo,

Re: [R] Remove entry with sensitive information from history

2015-05-27 Thread Luca Cerone
Hi David, thanks, but the function has to work from an R shell, I have no graphical server in my remote machines. On Wed, May 27, 2015 at 9:45 AM, David Winsemius wrote: > > On May 27, 2015, at 12:29 AM, Luca Cerone wrote: > >> Hi everybody, >> >> in one of my packages I store encrypted password.

Re: [R] Remove entry with sensitive information from history

2015-05-27 Thread David Winsemius
On May 27, 2015, at 12:29 AM, Luca Cerone wrote: > Hi everybody, > > in one of my packages I store encrypted password. > > If the user has to change the password in use she can run: > > update_password(old_password, new_password) > > The problem is that the commands ends up in the .Rhistory f

[R] Remove entry with sensitive information from history

2015-05-27 Thread Luca Cerone
Hi everybody, in one of my packages I store encrypted password. If the user has to change the password in use she can run: update_password(old_password, new_password) The problem is that the commands ends up in the .Rhistory file. Is there any way I can avoid this? Any suggestion about it? Ch