This diff uses 'g' to refresh the dired buffer. mark
Index: dired.c =================================================================== RCS file: /cvs/src/usr.bin/mg/dired.c,v retrieving revision 1.62 diff -u -p -r1.62 dired.c --- dired.c 2 Jun 2013 10:09:21 -0000 1.62 +++ dired.c 2 Jun 2013 11:23:33 -0000 @@ -45,6 +45,7 @@ static int d_backpage(int, int); static int d_forwline(int, int); static int d_backline(int, int); static int d_killbuffer_cmd(int, int); +static int d_refreshbuffer(int, int); static void reaper(int); static struct buffer *refreshbuffer(struct buffer *); @@ -103,7 +104,8 @@ static PF diredc[] = { d_copy, /* c */ d_del, /* d */ d_findfile, /* e */ - d_findfile /* f */ + d_findfile, /* f */ + d_refreshbuffer /* g */ }; static PF diredn[] = { @@ -166,7 +168,7 @@ static struct KEYMAPE (7 + NDIRED_XMAPS CCHR('Z'), '+', diredcz, (KEYMAP *) & metamap }, { - 'c', 'f', diredc, NULL + 'c', 'g', diredc, NULL }, { 'n', 'x', diredn, NULL @@ -649,6 +651,17 @@ int d_killbuffer_cmd(int f, int n) { return(killbuffer_cmd(FFRAND, 0)); +} + +int +d_refreshbuffer(int f, int n) +{ + struct buffer *bp; + + if ((bp = refreshbuffer(curbp)) == NULL) + return (FALSE); + + return (showbuffer(bp, curwp, WFFULL | WFMODE)); } struct buffer * Index: mg.1 =================================================================== RCS file: /cvs/src/usr.bin/mg/mg.1,v retrieving revision 1.83 diff -u -p -r1.83 mg.1 --- mg.1 2 Jun 2013 10:09:21 -0000 1.83 +++ mg.1 2 Jun 2013 11:23:33 -0000 @@ -941,6 +941,8 @@ dired-do-copy dired-flag-file-deletion .It e, f and C-m dired-find-file +.It g +dired-revert .It n dired-next-line .It o @@ -989,6 +991,8 @@ This function works just like dired, exc dired buffer in another window. .It dired-previous-line Move the cursor to the previous line. +.It dired-revert +Refresh the dired buffer. .It dired-scroll-down Scroll down the dired buffer. .It dired-scroll-up