]> Sergey Matveev's repositories - nnn.git/commitdiff
Re-scan directory contents after spawning a shell
authorArun Prakash Jana <engineerarun@gmail.com>
Wed, 29 Mar 2017 14:38:34 +0000 (20:08 +0530)
committerArun Prakash Jana <engineerarun@gmail.com>
Wed, 29 Mar 2017 16:13:39 +0000 (21:43 +0530)
The contents of the directory may be changed from the shell by adding or deleting content. Permissions may have changed too. We must re-populate the contents of the current directory.

README.md
noice.c

index 57bde14e14aac7a3baa6f90d33aaee2e18fb1999..9df00db38734b7fc549f9781645a2a160d7af077 100644 (file)
--- a/README.md
+++ b/README.md
@@ -78,7 +78,7 @@ No plans of packaging at the time.
 Start noice (default: current directory):
 
     $ noice [path_to_dir]
-`>` indicates the currently selected item.
+`>` indicates the currently selected entry.
 
 ### Keyboard shortcuts
 
@@ -94,12 +94,12 @@ Start noice (default: current directory):
 | `End`, `Ctrl-e`, `$` | jump to last dir entry |
 | `~` | jump to home dir |
 | `/`, `&` | filter dir contents |
-| `c` | change dir |
+| `c` | show change dir prompt |
 | `.` | toggle hide dot files |
 | `t` | toggle sort by modified time |
 | `!` | spawn a shell in current dir |
-| `e` | edit item in `vim` |
-| `p` | open item with `less` pager |
+| `e` | edit entry in `vim` |
+| `p` | open entry with `less` pager |
 | `z` | run `top` |
 | `Ctrl-l` | redraw window |
 | `q` | quit noice |
diff --git a/noice.c b/noice.c
index db19ab7b4522c107cb2ca7e7321b191675efeede..25f2f9510173942f43ab8116ee923e6cefda40c8 100644 (file)
--- a/noice.c
+++ b/noice.c
@@ -819,7 +819,8 @@ nochange:
                        exitcurses();
                        spawn(run, NULL, path);
                        initcurses();
-                       break;
+                       /* Re-populate as directory content may have changed */
+                       goto begin;
                case SEL_RUNARG:
                        run = xgetenv(env, run);
                        exitcurses();