pimalaya / himalaya

CLI to manage emails
https://pimalaya.org
MIT License
3.17k stars 95 forks source link

Support Unix pipes in password commands #373

Closed pleshevskiy closed 1 year ago

pleshevskiy commented 2 years ago

I use passwordstore (pass) to display a password for imap and I have a password for email with metadata.

Himalaya cannot find my password in the first line

Steps to reproduce:

  1. pass add example
  2. add content
    secret
    url: http://example.com
    login: my@example.com
  3. configure pass_cmd for himalaya pass show example

Expected behavior

himalaya successfully logged in

Actual behavior

Error: cannot login to IMAP server

Caused by:
    No Response: LOGIN failed.
soywod commented 2 years ago

Himalaya is not aware of tools used to retrieve passwords. And it is a good thing. What you propose goes against this principle. I would suggest instead to use your own tools to extract the first line. For eg.: pass show example | head -n 1.

pleshevskiy commented 2 years ago

@soywod actually himalaya doesn't support pipe in password command

soywod commented 2 years ago

It's true that the pipe is not managed properly by the password command, but it should work. Have you tried? Anyway, I reopen this issue for supporting well the pipe. It is already done for SMTP commands, so it should not be so difficult to set up.

soywod commented 1 year ago

Added since the v0.6.1.