login

<     >

2015-05-26 15:14:23 (UTC-03:00)

Marcel Rodrigues <marcelgmr@gmail.com>

Add 'R' to refresh listing.

diff --git a/README.md b/README.md
index 40d6092..8846519 100644
--- a/README.md
+++ b/README.md
@@ -35,6 +35,7 @@ Quick Start
        l - enter selected directory
        h - go to parent directory
        H - go to $HOME directory
+       R - refresh directory listing
   RETURN - open $SHELL on the current directory
    SPACE - open $PAGER with the selected file
        e - open $EDITOR with the selected file

diff --git a/config.h b/config.h
index 8397f48..ff36965 100644
--- a/config.h
+++ b/config.h
@@ -11,6 +11,7 @@
 #define RVK_CD_DOWN     "l"
 #define RVK_CD_UP       "h"
 #define RVK_HOME        "H"
+#define RVK_REFRESH     "R"
 #define RVK_SHELL       "^M"
 #define RVK_VIEW        " "
 #define RVK_EDIT        "e"

diff --git a/rover.1 b/rover.1
index 7b170d7..3b95ebc 100644
--- a/rover.1
+++ b/rover.1
@@ -81,6 +81,9 @@ Go to parent directory.
 .B H
 Go to \fB$HOME\fR directory.
 .TP
+.B R
+Refresh directory listing.
+.TP
 .B <RETURN>
 Open \fB$SHELL\fR on the current directory.
 .TP

diff --git a/rover.c b/rover.c
index 58d79d3..5aad957 100644
--- a/rover.c
+++ b/rover.c
@@ -841,6 +841,8 @@ main(int argc, char *argv[])
             if (CWD[strlen(CWD) - 1] != '/')
                 strcat(CWD, "/");
             cd(1);
+        } else if (!strcmp(key, RVK_REFRESH)) {
+            reload();
         } else if (!strcmp(key, RVK_SHELL)) {
             program = getenv("SHELL");
             if (program) {