]> Sergey Matveev's repositories - public-inbox.git/blobdiff - lib/PublicInbox/LeiQuery.pm
lei q: disallow "\n" in argv[] elements
[public-inbox.git] / lib / PublicInbox / LeiQuery.pm
index 352ee60131aaf6bc9baabfbd4ae735c4a0f06568..51ee3d9c83e47b1fed21f02a9cc02b51751d2507 100644 (file)
@@ -141,6 +141,7 @@ no query allowed on command-line with --stdin
                PublicInbox::InputPipe::consume($self->{0}, \&qstr_add, $self);
                return;
        }
+       chomp(@argv) and $self->qerr("# trailing `\\n' removed");
        $mset_opt{q_raw} = [ @argv ]; # copy
        $mset_opt{qstr} =
                $self->{lse}->query_argv_to_string($self->{lse}->git, \@argv);