]> git.notmuchmail.org Git - notmuch/blobdiff - contrib/notmuch-mutt/notmuch-mutt
Make notmuch-mutt script more portable
[notmuch] / contrib / notmuch-mutt / notmuch-mutt
index 97fb2d85160cb9a495de68c31103671beeae3fc0..d33223bdd88e776acf79ae8b4ba2703ff1e6cc58 100755 (executable)
@@ -50,7 +50,7 @@ sub search($$$) {
     empty_maildir($maildir);
     system("notmuch search --output=files $dup_option $query"
           . " | sed -e 's: :\\\\ :g'"
-          . " | xargs -r -I searchoutput ln -s searchoutput $maildir/cur/");
+          . " | while IFS= read -r searchoutput; do ln -s \$searchoutput $maildir/cur/; done");
 }
 
 sub prompt($$) {
@@ -91,7 +91,7 @@ sub get_message_id() {
        $mid = $1;
     } else {  # Message-ID header not found, synthesize a message id
              # based on SHA1, as notmuch would do.  See:
-             # http://git.notmuchmail.org/git/notmuch/blob/HEAD:/lib/sha1.c
+             # https://git.notmuchmail.org/git/notmuch/blob/HEAD:/lib/sha1.c
        my $sha = Digest::SHA->new(1);
        $sha->add($_) foreach(@headers);
        $sha->addfile(\*STDIN);