Commit graph

149 commits

Author SHA1 Message Date
Drew DeVault
4fc6fee734 Revert "add close command at global level"
This reverts commit f0a0c5aa73.
2019-08-13 10:55:50 +09:00
Aditya Srivastava
f0a0c5aa73 add close command at global level 2019-08-13 10:49:34 +09:00
Daniel Bridges
72204d1f24 Add optional body argument to compose command 2019-08-13 10:49:34 +09:00
Ben Cohen
4d95676274 Joining the args in cf for folders with spaces 2019-08-12 09:02:24 +09:00
Jelle Besseling
4478c6a4b7 Ignore scroll command when msgstore is nil
Fixes ~sircmpwn/aerc2#205. Many functions do a nil check on the store,
so this changes Store() so it returns nil when msglist is nil.

It also places the Scroll() behind the nil check in the next-message command.

https://todo.sr.ht/~sircmpwn/aerc2/205
2019-08-12 08:58:57 +09:00
Daniel Bridges
5b523880b4 Let user edit arbitrary headers in composer 2019-08-12 08:57:04 +09:00
Art Wild
d4416e74ac Fix unread command
This fixes ~sircmpwn/aerc2#195. While `read -t` works fine.
The `unread` command is not wired. This patch fixes it.

https://todo.sr.ht/~sircmpwn/aerc2/195
2019-08-08 10:12:17 +09:00
Jelle Besseling
507c90537c Implement next-message in msgview using account
This makes sure that the next-message command accepts the same arguments
in the account view and the msgview
2019-08-07 15:10:24 +09:00
Jelle Besseling
3650b72ca6 Implement next-folder using NextPrev with amount
This fixes ~sircmpwn/aerc2#182

https://todo.sr.ht/~sircmpwn/aerc2/182
2019-08-07 15:02:11 +09:00
Daniel Bridges
0a52124102 Allow cc/bcc command to receive no arguments 2019-08-07 14:07:48 +09:00
Kevin Kuehler
0ceea02720 cc/bcc: Append to existing headers if called twice
Signed-off-by: Kevin Kuehler <keur@ocf.berkeley.edu>
2019-08-07 14:07:22 +09:00
Ben Burwell
63f934ee71 Fix directory completion case sensitivity
Before, lower_only was not being correctly set and was only considering
whether the string ended with a lowercase sequence. Refactored this with
some more explicit functions as the logic is a little confusing.
2019-08-03 10:48:47 -04:00
Daniel Bridges
f4b7741463 Add cc and bcc commands 2019-08-03 10:43:55 -04:00
Aditya Srivastava
b72bb27cb4 select next message when deleting from message viewer 2019-08-02 09:36:41 -04:00
Reto Brunner
3424c36d52 ChangeFolder: do not depend on the msgstore
We need to clear the filtering etc upon folder switch.
Not having a valid msgstore is however no reason not to switch directories.
2019-08-02 09:26:10 -04:00
Galen Abell
bfefafff27 Add filesystem completions for :attach and :cd
Tab-completions now cycle through filesystem paths when using :attach or
:cd commands.
2019-08-02 09:22:40 -04:00
Galen Abell
c4b57aaad8 Add CompletePath method
CompletePath takes an existing path and returns possible filesystem
completions based on that path.
2019-08-02 09:22:39 -04:00
Reto Brunner
c81b3eb1cb Sendmail: allow for arbitrary parameters
Allows the outgoing command to contain arguments and flags
2019-07-29 14:51:12 -04:00
Jeffas
989730d470 Add index option to change-tab
This allows selection of a tab using its index. It attempts to parse the
given argument as a number, if it fails then it uses it as a name.

Also supports relative indexes using prefixed + or -.
2019-07-27 12:40:28 -04:00
Galen Abell
0ee7d30187 Add :detach command
Add a command for removing attachments from a composed message. Syntax
is :detach [path], with path being an optional argument specifying the
path of one existing attachment. If no path is specified, the first
attachment is removed.
2019-07-27 12:37:55 -04:00
Drew DeVault
d931bbeff1 Add missing fallthrough 2019-07-27 12:36:30 -04:00
Drew DeVault
48758136c0 Implement sendmail support 2019-07-27 11:19:49 -04:00
Jeffas
cded067bc3 Add tab completion to textinputs
This adds tab completion to textinput components. They can be configured
with a completion function. This function is called when the user
presses <tab>. The first completion is initially shown to the user
inserted into the text. Repeated presses of <tab> or <backtab> cycle
through the completions list. The completions list is invalidated when
any other non-tab-like key is pressed.

Also changed is some logic for current completion generation so that
all available commands are returned when <tab> is pressed with no
current text and similarly for arguments of commands.
2019-07-26 14:39:42 -04:00
Galen Abell
8635c70fda Add command history and cycling
Aerc will keep track of the previous 1000 commands, which the user can
cycle through using the arrow keys while in the ex-line. Pressing up
will move backwards in history while pressing down will move forward.
2019-07-26 14:29:34 -04:00
Daniel Bridges
67fb0938a6 Support configurable header layout in compose widget 2019-07-26 14:22:04 -04:00
Jeffas
dc4c36adbf Add new-email trigger
This patch sets up the trigger config section of aerc.conf.

Each trigger has its own function which is called from the place where
it is triggered. Currently only the new-email trigger is implemented.

The triggers make use of format strings. For instance, in the new-email
trigger this allows the user to select the trigger command and also the
information extracted from the command and placed into their command.

To actually execute the trigger commands the keypresses are simulated.

Further triggers can be implemented in the future.

Formatting of the command is moved to a new package.
2019-07-26 14:00:24 -04:00
Jeffas
ee5b537d53 Fix :close on terminal panic
Executing :close on a terminal would panic due to it already having been
removed.

This is also related to the fact that removing a tab doesn't check for
whether it actually found a tab to remove or not.
2019-07-25 18:12:08 -04:00
Jeffas
4541519225 Add space which was missing 2019-07-25 18:12:05 -04:00
Jeffas
e42b95a617 Add change tab command
This command allows the user to change tab by giving the tab name. This
can be tab completed too. The previous tab is stored in the tabs module
so that when a new tab is created it is still possible to go to the
previous one.

Normal invocation is :ct folder
Previous tab is :ct -
2019-07-23 10:27:59 -04:00
Kevin Kuehler
f81e4bd41c Implement :filter, :clear
Signed-off-by: Kevin Kuehler <keur@ocf.berkeley.edu>
2019-07-19 11:30:32 -04:00
Galen Abell
7899d15d60 Add :attach command for compose
Allow users to add attachments to emails in the Compose view. Syntax is
:attach <path>, where path is a valid file. Attachments will show up in
the pre-send review screen.
2019-07-19 10:30:47 -04:00
Drew DeVault
fe7230bb9a Add :cp alias for :copy 2019-07-17 18:42:03 -04:00
Nicolai Dagestad
a1763bf207 Add an option to toggle between read and unread 2019-07-17 17:01:25 -04:00
Jeffas
715c9a4797 Update status message to include destination 2019-07-17 15:59:08 -04:00
Kevin Kuehler
8bb115dbae commands: Don't crash when store is nil
On a slow network connection, running these commands without this guard
will cause aerc to panic.

Signed-off-by: Kevin Kuehler <keur@ocf.berkeley.edu>
2019-07-15 09:46:49 -04:00
Pedro L. Ramos
d85f671bdf 71: Allow user to change config options at runtime
There is a LoadConf and a LoadConfFromFile.
LoadConfFromFile reads the iniFile into memory and and calls
LoadConf, which executes the old parsing commands from
LoadConf (old func).

The remaining of the LoadConfFromFile is the same as the old OldConf.
2019-07-15 09:42:03 -04:00
Daniel Bridges
217e85a55d Fix crashes when operating on empty folder (#216) 2019-07-10 13:21:38 -04:00
Drew DeVault
3f30c27bb3 Fix :pipe -b actually writing to stdin 2019-07-08 18:50:40 -04:00
Drew DeVault
133085b436 Fix re-opening of expired pipe tabs 2019-07-08 18:32:31 -04:00
Drew DeVault
6797f93476 :exec, :pipe: show exit status on completion 2019-07-08 18:22:41 -04:00
Drew DeVault
7ecc6f96de Add :exec and :pipe -b(ackground) 2019-07-08 18:19:08 -04:00
Ben Burwell
c610c3cd9d Factor IMAP-specific structs out of UI models
Before, we were using several IMAP-specific concepts to represent
information being displayed in the UI. Factor these structures out of
the IMAP package to make it easier for other backends to provide the
required information.
2019-07-08 16:06:28 -04:00
Drew DeVault
363aab5cc1 Make :pipe command more generic 2019-07-05 12:21:12 -04:00
Drew DeVault
f9f523ad59 Remove unused caps string 2019-07-04 12:33:19 -04:00
Gregory Mullen
f9d26eef58 Add IMAP folder tab completion
Credit for this fix goes to Reto; I guess if we're not gonna be mutt
we should probabaly do things correctly.
2019-07-04 11:28:04 -04:00
Zach Sisco
ddd0fa428f Crash on delete in empty folder (#213) 2019-07-04 11:08:08 -04:00
Ben Burwell
030f390436 Add unsubscribe command
The unsubscribe command, available when in a message viewer context,
enables users to easily unsubscribe from mailing lists.

When the command is executed, aerc looks for a List-Unsubscribe header
as defined in RFC 2369. If found, aerc will attempt to present the user
with a suitable interface for completing the request. Currently, mailto
and http(s) URLs are supported. In the case of a HTTP(S) URL, aerc will
open the link in a browser. For mailto links, a new composer tab will be
opened with a message filled out according to the URL. The message is
not sent automatically in order to provide the user a chance to review
it first.

Closes #101
2019-07-04 11:06:14 -04:00
Ben Burwell
1bb1a80156 Use "open" instead of "xdg-open" on Darwin systems 2019-07-04 10:58:33 -04:00
Gregory Mullen
2a0961701c Implement basic tab completion support
Tab completion currently only works on commands. Contextual completion
will be added in the future.
2019-06-29 14:24:19 -04:00
Drew DeVault
91a75cd98b Implement :search, :next-result, :prev-result 2019-06-26 20:50:54 -04:00