summaryrefslogtreecommitdiff
path: root/commands/msgview/save.go
AgeCommit message (Collapse)Author
2022-06-24pgp: fix pipe|open|save command behaviorTim Culverhouse
Signed and/or encrypted PGP messages did not behave properly for pipe, open, and save commands. Specifically, the proper Message Part would not be passed to the command in the MessageViewer. This is due to the encapsulation of the body structure. This patch fixes the behavior for piping|opening|saving of message parts. Fixes: https://todo.sr.ht/~rjarry/aerc/47 Reported-by: ~ph14nix Signed-off-by: Tim Culverhouse <tim@timculverhouse.com> Tested-by: Moritz Poldrack <moritz@poldrack.dev> Acked-by: Robin Jarry <robin@jarry.cc>
2022-03-31save: fix path completionRobin Jarry
Ignore option flags and prepend default-save-path if the current path is not absolute. Signed-off-by: Robin Jarry <robin@jarry.cc> Reviewed-by: Moritz Poldrack <moritz@poldrack.dev>
2022-03-24save: add -a option to save all attachmentsRobin Jarry
Allow saving all message parts that have the content disposition "attachment" header to a folder. Suggested-by: Ondřej Synáček <ondrej@synacek.org> Signed-off-by: Robin Jarry <robin@jarry.cc> Acked-by: Koni Marti <koni.marti@gmail.com> Tested-by: Moritz Poldrack <moritz@poldrack.dev>
2022-03-23logging: added a log on panicMoritz Poldrack
Since panics still regularly "destroy" the terminal, it is hard to get a stack trace for panics you do not anticipate. This commit adds a panic handler that automatically creates a logfile inside the current working directory. It has to be added to every goroutine that is started and will repair the terminal on a panic. Signed-off-by: Moritz Poldrack <git@moritz.sh> Acked-by: Robin Jarry <robin@jarry.cc>
2022-03-12all: fix minor issues found by staticcheckMoritz Poldrack
Signed-off-by: Moritz Poldrack <git@moritz.sh>
2021-11-05go.mod: change base git urlRobin Jarry
I'm not sure what are the implications but it seems required. Link: https://github.com/golang/go/issues/20883 Signed-off-by: Robin Jarry <robin@jarry.cc>
2021-01-14save: if part name is a path, only use the filenameRobin Opletal
2020-05-28Revert "Add Style configuration"Drew DeVault
This reverts commit 0f78f06610c0e8887aba2ae50e99b86477a384b3.
2020-05-28Revert "Remove duration from the status methods"Drew DeVault
This reverts commit f06d683688e3d2139b14f67b7e349089e7200bf4.
2020-05-27Remove duration from the status methodsReto Brunner
We always set 10 seconds anyhow, might as well do that without repeating ourselfs.
2020-05-27Add Style configurationReto Brunner
The following functionalities are added to configure aerc ui styles. - Read stylesets from file with very basic fnmatch wildcard matching - Add default styleset - Support different stylesets as part of UiConfig allowing contextual styles. - Move widgets/ui elements to use the stylesets. - Add configuration manual for the styleset
2020-05-17FetchBodyPart doesn't need the parent body structureReto Brunner
2020-03-09Refactoring: remove store from PartInfoDrew DeVault
2020-01-20msgview/save: Adapt to already decoded readerReto Brunner
The functionality was broken since the decoding changes. This commit also simplifies the code (in my view) to make the application logic easier to follow. The docs are updated accordingly (the feature was poorly documented). As far as I am aware there should be no breaking changes (and is certainly still in the spec of the prior documentation)
2020-01-05FetchBodyParts: decode source in the workersReto Brunner
Previously the workers returned a mixture of decoded / encoded parts. This lead to a whole bunch of issues. This commit changes the msgviewer and the commands to assume parts to already be decoded
2019-12-07failback to Content-Type filename when encoded Content-Disposition is usedLeszek Cimała
Hi! This patch will fix missing filename if it is RFC2231 encoded with charset different then ASCII or UTF8. Example how it looks like in mail: Content-Type: application/pdf; name="=?UTF-8?Q?Opis_przedmiotu_zam=c3=b3wienia_-_za=c5=82=c4=85cznik_nr_1?= =?UTF-8?Q?=2epdf?=" Content-Transfer-Encoding: base64 Content-Disposition: attachment; filename*0*=iso-8859-2''%4F%70%69%73%20%70%72%7A%65%64%6D%69%6F%74%75%20; filename*1*=%7A%61%6D%F3%77%69%65%6E%69%61%20%2D%20%7A%61%B3%B1%63%7A%6E; filename*2*=%69%6B%20%6E%72%20%31%2E%70%64%66 Yes, this should be forbidden :-). Anyway, best solotion in such cases is to failback to Content-Type name. I am not sure if it is guaranted to be there, but probably it will. Leszek
2019-09-20Make commands join args with spacesJeffas
This patch ensures the following commands join their arguments with spaces to make it easier to interact with: - cf - mkdir - cd - attach - detach - ct - copy - move - save
2019-09-04all: purge redundant underscoresWagner Riffel
Signed-off-by: Wagner Riffel <wgrriffel@gmail.com>
2019-07-05Make :pipe command more genericDrew DeVault
2019-06-29Implement basic tab completion supportGregory Mullen
Tab completion currently only works on commands. Contextual completion will be added in the future.
2019-06-25msgview/save: Use defaultSavePath if no path is providedReto Brunner
2019-06-16Make part encoding checks case insensitiveRéouven Assouly
commands/msgview/save and commands/msgview/pipe now use case insensitive comparisons to determine if the part is encoded as base64 or quoted-printable.
2019-06-14Support directories in path to :saveClayton Craft
This adds new functionality to :save in the message view for specifying directories in the path. A new flag, -p, is also added to :save for automatically creating any directories in the path that do not exist. If the path ends in a / (e.g. "Downloads/mail/") or if the path is an existing directory, the part's file name is the filename from the mail header for the part. Otherwise, it uses the last element in the path as the filename (e.g. 'blah.jpg' is the filename if the path is 'Downloads/mail/blah.jpg')
2019-05-27Add :save and :pipe commands to viewerGalen Abell
* :save takes a path and saves the current message part to that location * :pipe is the same as pipe on the account page, but uses the current message part rather than the whole email (ie :pipe gzip -d) * Refactored account:pipe and extracted common pipe code to commands.util.QuickTerm * Added helper command aerc.PushError