Bug Report

William Morris me at williammorris.com
Sat Jul 4 02:44:59 CEST 2020


Does something like this work?
```
pass="$($GPG -d "${GPG_OPTS[@]}" "$passfile" | sed -n
${selected_line}p)" || exit $?
```

On 7/3/20 7:09 PM, Vasile Martiniuc wrote:
> Good afternoon,
> 
> This line is wrong:
> pass="$($GPG -d "${GPG_OPTS[@]}" "$passfile" | tail -n
> +${selected_line} | head -n 1)" || exit $?
> 
> "head -n 1" (or "head -1") exits immediately after reading the first
> line. And the "tail" is still writing to the pipe, but there is no
> reader because "head" has exited.
> It send SIGPIPE from the kernel and it exits with the status code 141.
> 
> You should not use "|| exit". The "${PIPESTATUS[@]}" is "0 141 0" and
> the password is not copied to the clipboard if there are more than one
> line.
> I can't copy passwords if there are more lines (10, 20, 30...).
> 


More information about the Password-Store mailing list