statusline-format: add %p placeholder for current path

Allow showing the current working directory in the statusline via
[statusline] render-format=%p, which is useful if the user changes
directories often.

Signed-off-by: Bence Ferdinandy <bence@ferdinandy.com>
Tested-by: Tim Culverhouse <tim@timculverhouse.com>
Acked-by: Robin Jarry <robin@jarry.cc>
This commit is contained in:
Bence Ferdinandy 2022-09-17 23:26:35 +02:00 committed by Robin Jarry
parent f414db7858
commit 74fd5d1119
3 changed files with 14 additions and 0 deletions
commands

View file

@ -60,6 +60,7 @@ func (ChangeDirectory) Execute(aerc *widgets.Aerc, args []string) error {
}
if err := os.Chdir(target); err == nil {
previousDir = cwd
aerc.UpdateStatus()
}
return err
}