Please add command (eg 'xpx') to copy the password to clipboard (like 'xp') and clear clipboard (like 'xx') after 10 seconds (if the password is still in clipboard).
This is a real technical challenge due to the fact that Term::ShellUI has control of the process until commands are issued, and Term::ShellUI has no facility for timed calls or interupts. I'd be willing to consider some else's patch for this, preferably in the form of an enhancement to Term::ShellUI, but I am not willing to code it at this time.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
I gave this a bit more thought and decided to do it and so the xpx command will be in the next release. It does cause kpcli to not be interactive with the user for the 10 second countdown, but the feature is now in. Example of how it works:
kpcli-DEVELOPMENT:/> xpx eMail/foo
Copied password for "foo" to the clipboard.
Clipboard will be cleared in 0 seconds...
Clipboard cleared.
kpcli-DEVELOPMENT:/>
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
$diffkpcli-3.1.plkpcli-DEVELOPMENT.pl113c113<my$VERSION="3.1";--->my$VERSION="DEVELOPMENT";335a336,341>"xpx"=>{>desc=>"Copy password to clipboard, with auto-clear: xpx <entry path|number>",>minargs=>1,maxargs=>1,>args=>\&complete_groups_and_entries,>method=>sub{cli_xN('xpx',@_);}>},1720c1726<$xNcmdeq'xp'&&do{--->$xNcmd=~m/^xpx?$/&&do{1731a1738>'xpx'=>'password',1737a1745,1761># The user has asked us to auto-clear the clipboard>if($xNcmdeq'xpx'){>formy$n(reverse(0..9)){>formy$i(reverse(0..9)){>if(($i>0||$n==0)&&!($i%3)){>print"\rClipboard will be cleared in $n.$i seconds...";>}>if(recent_sigint()){print"\n";returnundef;}# Bail on SIGINT>Time::HiRes::sleep(0.1);>}>}>print"\n";>Clipboard->copy('');>print"Clipboard cleared.\n";>return;>}>5446a5471>2016-xxx-xxv3.2-AddedxpxcommandpertherequestinSFticket#32.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
This is a real technical challenge due to the fact that Term::ShellUI has control of the process until commands are issued, and Term::ShellUI has no facility for timed calls or interupts. I'd be willing to consider some else's patch for this, preferably in the form of an enhancement to Term::ShellUI, but I am not willing to code it at this time.
I gave this a bit more thought and decided to do it and so the xpx command will be in the next release. It does cause kpcli to not be interactive with the user for the 10 second countdown, but the feature is now in. Example of how it works:
Many thanks.
Where can I find the patch for this feature, so I can use/test it? Is there no VCS for kpcli?
Here is the diff: