projects
/
clearscm.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Merge branch 'master' of git+ssh://github.com/adefaria/clearscm
[clearscm.git]
/
lib
/
Utils.pm
diff --git
a/lib/Utils.pm
b/lib/Utils.pm
index
eddef3a
..
29e020c
100644
(file)
--- a/
lib/Utils.pm
+++ b/
lib/Utils.pm
@@
-341,10
+341,9
@@
Returns:
=cut
=cut
-
$prompt ||= 'Password';
$prompt ||= 'Password';
- my $password;
+ my $password
= ''
;
local $| = 1;
local $| = 1;
@@
-365,9
+364,18
@@
Returns:
last;
} # if
last;
} # if
- print '*';
+ # Handle backspaces
+ if ($key eq chr(127)) {
+ unless ($password eq '') {
+ chop $password;
+
+ print "\b \b";
+ } # unless
+ } else {
+ print '*';
- $password .= $key;
+ $password .= $key;
+ } # if
} # while
ReadMode 'restore'; # Reset tty mode before exiting.
} # while
ReadMode 'restore'; # Reset tty mode before exiting.
@@
-578,7
+586,7
@@
Returns:
=cut
=cut
- open my $pipe, '|
-', $to
+ open my $pipe, '|
', $to
or error "Unable to open pipe - $!", 1;
foreach (@output) {
or error "Unable to open pipe - $!", 1;
foreach (@output) {