1
0
Fork 0
mirror of https://git.sr.ht/~rjarry/aerc synced 2026-03-14 03:16:22 +01:00
aerc/commands
Arjuna Del Toso 841270ea47 dirtree: add toggle-folder command
Add a new :toggle-folder command that toggles the expand/collapse state
of a folder in the directory tree view. This provides a convenient
single command alternative to using :expand-folder and :collapse-folder
separately.

The toggle behavior is consistent with existing commands:
- For folders with children: toggles the folder's own hidden state
- For leaf nodes: toggles the parent folder (same as collapse)
- For root nodes without children: no-op (nothing to toggle)

Also add comprehensive unit tests for collapse, expand, and toggle
folder operations covering top-level, nested, and deeply nested folders.

Changelog-added: `:toggle-folder` command to toggle directory tree
 expand/collapse state.
Signed-off-by: Arjuna Del Toso <arjuna@deltoso.net>
Tested-by: Inwit <inwit@sindominio.net>
Acked-by: Robin Jarry <robin@jarry.cc>
2026-03-07 21:15:56 +01:00
..
account dirtree: add toggle-folder command 2026-03-07 21:15:56 +01:00
compose send: fix empty message copied to sent folder 2026-02-10 22:52:05 +01:00
mode lint: simplify code (gosimple) 2022-08-04 21:57:52 +02:00
msg archive: pass account and store to archive function 2026-02-09 14:50:56 +01:00
msgview config: allow specifying the temporary directory 2025-10-30 21:17:44 +01:00
patch patch: use subcommand descriptions in completion items 2025-11-17 09:51:00 +01:00
testdata completion: complete paths with FilterList 2024-10-27 10:15:08 +01:00
cd.go completion: add command option descriptions 2024-10-23 10:22:51 +02:00
choose.go completion: add commands descriptions 2024-10-23 10:22:51 +02:00
close.go completion: add commands descriptions 2024-10-23 10:22:51 +02:00
commands.go commands: make commands.Register() strict in non-accepting pointers 2025-11-05 10:42:19 +01:00
completion_helpers.go reload: fix crash when reloading via IPC 2025-09-23 14:02:37 +02:00
completion_helpers_test.go commands: add OptionsProvider and OptionCompleter 2023-05-16 13:39:17 +02:00
ct.go commands: allow positional arguments starting with "-" 2025-03-31 16:35:54 +02:00
echo.go completion: add commands descriptions 2024-10-23 10:22:51 +02:00
eml.go completion: add command option descriptions 2024-10-23 10:22:51 +02:00
exec.go completion: add commands descriptions 2024-10-23 10:22:51 +02:00
help.go help: list pages dynamically from mandb 2025-12-11 21:37:09 +01:00
history.go commands: add :repeat 2026-03-07 19:48:38 +01:00
menu.go menu: add option to feed with extracted links 2026-03-07 19:39:20 +01:00
move-tab.go commands: allow positional arguments starting with "-" 2025-03-31 16:35:54 +02:00
new-account.go completion: add command option descriptions 2024-10-23 10:22:51 +02:00
next-tab.go commands: allow positional arguments starting with "-" 2025-03-31 16:35:54 +02:00
pin-tab.go completion: add commands descriptions 2024-10-23 10:22:51 +02:00
prompt.go completion: add command option descriptions 2024-10-23 10:22:51 +02:00
pwd.go completion: add commands descriptions 2024-10-23 10:22:51 +02:00
quit.go completion: add command option descriptions 2024-10-23 10:22:51 +02:00
redraw.go completion: add commands descriptions 2024-10-23 10:22:51 +02:00
reload.go reload: trigger upon SIGHUP signal reception 2025-09-23 14:02:41 +02:00
repeat.go commands: add :repeat 2026-03-07 19:48:38 +01:00
send-keys.go completion: add commands descriptions 2024-10-23 10:22:51 +02:00
suspend.go completion: add commands descriptions 2024-10-23 10:22:51 +02:00
term.go term: allow setting custom title for the terminal tab 2025-05-05 13:49:04 +02:00
util.go commands: fix terminal output disappearing on mouse event 2026-02-10 11:02:30 +01:00
util_test.go completion: complete paths with FilterList 2024-10-27 10:15:08 +01:00
version.go commands: add version command 2025-02-20 23:09:47 +01:00
z.go completion: add command option descriptions 2024-10-23 10:22:51 +02:00