From f8caac383134e475323867ef8a9ae2787cc25456 Mon Sep 17 00:00:00 2001 From: Byrial Jensen Date: Sat, 23 Jul 2005 23:35:17 +0000 Subject: [PATCH] This is the current shortcut patch patch by Byrial Ole Jensen , updated by Christoph Berg . --- curs_main.c | 1 + doc/manual.sgml.head | 1 + globals.h | 1 + main.c | 1 + muttlib.c | 7 +++++++ 5 files changed, 11 insertions(+) diff --git a/curs_main.c b/curs_main.c index 4b6ded44a..c2b7c8c71 100644 --- a/curs_main.c +++ b/curs_main.c @@ -1073,6 +1073,7 @@ CHECK_IMAP_ACL(IMAP_ACL_DELETE); mutt_error (_("%s is not a mailbox."), buf); break; } + mutt_str_replace (&CurrentFolder, buf); if (Context) { diff --git a/doc/manual.sgml.head b/doc/manual.sgml.head index c8e65f997..8b1a68ccc 100644 --- a/doc/manual.sgml.head +++ b/doc/manual.sgml.head @@ -2241,6 +2241,7 @@ path. ! -- refers to your (incoming) mailbox > -- refers to your file < -- refers to your file +^ -- refers to the current mailbox - or !! -- refers to the file you've last visited ˜ -- refers to your home directory = or + -- refers to your directory diff --git a/globals.h b/globals.h index 1e570d314..f046ecdb6 100644 --- a/globals.h +++ b/globals.h @@ -130,6 +130,7 @@ WHERE char *Tochars; WHERE char *Username; WHERE char *Visual; +WHERE char *CurrentFolder; WHERE char *LastFolder; WHERE LIST *AutoViewList INITVAL(0); diff --git a/main.c b/main.c index 842580361..c979f1d63 100644 --- a/main.c +++ b/main.c @@ -910,6 +910,7 @@ int main (int argc, char **argv) strfcpy (folder, NONULL(Spoolfile), sizeof (folder)); mutt_expand_path (folder, sizeof (folder)); + mutt_str_replace (&CurrentFolder, folder); mutt_str_replace (&LastFolder, folder); if (flags & M_IGNORE) diff --git a/muttlib.c b/muttlib.c index 83fa34596..a86bdd6b5 100644 --- a/muttlib.c +++ b/muttlib.c @@ -456,6 +456,13 @@ char *_mutt_expand_path (char *s, size_t slen, int rx) } break; + case '^': + { + strfcpy (p, NONULL(CurrentFolder), sizeof (p)); + tail = s + 1; + } + break; + default: { *p = '\0'; -- 2.40.0