mirror of
https://github.com/jarun/nnn.git
synced 2025-01-11 18:39:42 +00:00
Re-scan directory contents after spawning a shell
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.
This commit is contained in:
parent
56dca997b9
commit
c64327b4a6
|
@ -78,7 +78,7 @@ No plans of packaging at the time.
|
||||||
Start noice (default: current directory):
|
Start noice (default: current directory):
|
||||||
|
|
||||||
$ noice [path_to_dir]
|
$ noice [path_to_dir]
|
||||||
`>` indicates the currently selected item.
|
`>` indicates the currently selected entry.
|
||||||
|
|
||||||
### Keyboard shortcuts
|
### Keyboard shortcuts
|
||||||
|
|
||||||
|
@ -94,12 +94,12 @@ Start noice (default: current directory):
|
||||||
| `End`, `Ctrl-e`, `$` | jump to last dir entry |
|
| `End`, `Ctrl-e`, `$` | jump to last dir entry |
|
||||||
| `~` | jump to home dir |
|
| `~` | jump to home dir |
|
||||||
| `/`, `&` | filter dir contents |
|
| `/`, `&` | filter dir contents |
|
||||||
| `c` | change dir |
|
| `c` | show change dir prompt |
|
||||||
| `.` | toggle hide dot files |
|
| `.` | toggle hide dot files |
|
||||||
| `t` | toggle sort by modified time |
|
| `t` | toggle sort by modified time |
|
||||||
| `!` | spawn a shell in current dir |
|
| `!` | spawn a shell in current dir |
|
||||||
| `e` | edit item in `vim` |
|
| `e` | edit entry in `vim` |
|
||||||
| `p` | open item with `less` pager |
|
| `p` | open entry with `less` pager |
|
||||||
| `z` | run `top` |
|
| `z` | run `top` |
|
||||||
| `Ctrl-l` | redraw window |
|
| `Ctrl-l` | redraw window |
|
||||||
| `q` | quit noice |
|
| `q` | quit noice |
|
||||||
|
|
3
noice.c
3
noice.c
|
@ -819,7 +819,8 @@ nochange:
|
||||||
exitcurses();
|
exitcurses();
|
||||||
spawn(run, NULL, path);
|
spawn(run, NULL, path);
|
||||||
initcurses();
|
initcurses();
|
||||||
break;
|
/* Re-populate as directory content may have changed */
|
||||||
|
goto begin;
|
||||||
case SEL_RUNARG:
|
case SEL_RUNARG:
|
||||||
run = xgetenv(env, run);
|
run = xgetenv(env, run);
|
||||||
exitcurses();
|
exitcurses();
|
||||||
|
|
Loading…
Reference in a new issue