]> granicus.if.org Git - neomutt/commitdiff
This is the current shortcut patch patch by Byrial Ole Jensen
authorByrial Jensen <byrial@image.dk>
Sat, 23 Jul 2005 23:35:17 +0000 (23:35 +0000)
committerByrial Jensen <byrial@image.dk>
Sat, 23 Jul 2005 23:35:17 +0000 (23:35 +0000)
<byrial@image.dk>, updated by Christoph Berg <cb@df7cb.de>.

curs_main.c
doc/manual.sgml.head
globals.h
main.c
muttlib.c

index 4b6ded44aa73f41ef778d6a5a4719faec18ecc17..c2b7c8c718ecbf93a818c4c1e41af5b48c2753e5 100644 (file)
@@ -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)
         {
index c8e65f9977549b748ad31675544ccfeb7623a67b..8b1a68ccc804bd3f8bd4e5511c49d99416bdb150 100644 (file)
@@ -2241,6 +2241,7 @@ path.
 <item>! -- refers to your <ref id="spoolfile" name="&dollar;spoolfile"> (incoming) mailbox
 <item>&gt; -- refers to your <ref id="mbox" name="&dollar;mbox"> file
 <item>&lt; -- refers to your <ref id="record" name="&dollar;record"> file
+<item>^ -- refers to the current mailbox
 <item>- or !! -- refers to the file you've last visited
 <item>&tilde; -- refers to your home directory
 <item>= or + -- refers to your <ref id="folder" name="&dollar;folder"> directory
index 1e570d314227a4e76645b5ac0fa55843e081bd54..f046ecdb6935ba6f430d4bae4f4f1c7db02e62bb 100644 (file)
--- 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 84258036160e59919584d7439b1e9592c5727efa..c979f1d63a53128513a4d4a4c8020dc0da550879 100644 (file)
--- 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)
index 83fa34596667e476e50a00cfbe0d74b908d78c39..a86bdd6b5fed55f1700fd152194e1c15aba5781b 100644 (file)
--- 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';