Skip to content

fix: honor positional input in save commands#646

Open
4paulpak wants to merge 1 commit intopimalaya:masterfrom
4paulpak:bugfix/645-save-input
Open

fix: honor positional input in save commands#646
4paulpak wants to merge 1 commit intopimalaya:masterfrom
4paulpak:bugfix/645-save-input

Conversation

@4paulpak
Copy link

Closes #645

This fixes non-interactive positional input handling for draft save commands.

Changes:

  • message save now uses the positional message when it is provided, even when stdin is not a TTY
  • template save now uses the positional template when it is provided, even when stdin is not a TTY
  • template save no longer appends the same draft twice

Repro before:

  • message save ... $'Subject: ...\r\n\r\nBody' sent APPEND Drafts {0}
  • template save ... $'From: ...\n\nBody' failed with cannot parse template

Verified with patched binary against IMAP proxy:

  • message save now sends a non-empty append (APPEND Drafts {71} in my repro)
  • template save now sends a non-empty append (APPEND Drafts {347} in my repro)

@4paulpak 4paulpak force-pushed the bugfix/645-save-input branch from 7ab2e05 to 0fae935 Compare March 14, 2026 08:51
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

message save and template save ignore positional input in non-interactive mode

1 participant