diff options
author | Jesse Luehrs <doy@tozt.net> | 2013-08-17 02:33:06 -0400 |
---|---|---|
committer | Jesse Luehrs <doy@tozt.net> | 2013-08-17 02:34:56 -0400 |
commit | 0479c5e0e48d500795d29a78b275920eb99458e8 (patch) | |
tree | c4ae7305fdbaf49d437dbf01788444cb10cd71f3 /bin | |
parent | b55c5450f0813f9ff55d25edde80444afa3d180f (diff) | |
download | conf-0479c5e0e48d500795d29a78b275920eb99458e8.tar.gz conf-0479c5e0e48d500795d29a78b275920eb99458e8.zip |
sigh, handle newlines properly
Diffstat (limited to 'bin')
-rwxr-xr-x | bin/pass | 3 | ||||
-rwxr-xr-x | bin/pwsafe2pass | 3 |
2 files changed, 3 insertions, 3 deletions
@@ -55,8 +55,7 @@ if ($cmd && $cmd eq 'search') { } } - my $pass = `$PASS show $found[0]`; - $pass =~ s/\s+$//; + chomp(my $pass = `$PASS show $found[0]`); if ($clipboard) { clip($pass); } diff --git a/bin/pwsafe2pass b/bin/pwsafe2pass index 62796e9..fa7b634 100755 --- a/bin/pwsafe2pass +++ b/bin/pwsafe2pass @@ -10,6 +10,7 @@ readline; readline; while (my $line = <>) { + chomp $line; my ($uuid, $group, $name, $login, $passwd, $notes) = map { s/^"(.*)"$/$1/; @@ -28,7 +29,7 @@ while (my $line = <>) { my $entry = join '/', $group, $name, length($login) ? ($login) : (); - open my $fh, '|-', 'pass', 'insert', ($notes ? ('-m') : ()), $entry + open my $fh, '|-', 'pass', 'insert', ($notes ? ('-m') : ('-e')), $entry or die "Couldn't insert!"; $fh->print("$passwd\n"); $fh->print("$notes\n") if $notes; |