diff options
author | 2020-01-02 03:58:09 +0530 | |
---|---|---|
committer | 2020-01-02 04:03:54 +0530 | |
commit | c44d5b57bd8eb6bb6ff72fff76adc2129e349aa8 (patch) | |
tree | b224d6dab179e6309530937c6071529c9d2084a7 | |
parent | c6a5db460f7e6fd72ebebc247fd0ce29403cb0f9 (diff) | |
download | nnn-c44d5b57bd8eb6bb6ff72fff76adc2129e349aa8.tar.gz |
Update docs, early check for empty files
-rw-r--r-- | README.md | 4 | ||||
-rw-r--r-- | src/nnn.c | 10 |
2 files changed, 7 insertions, 7 deletions
@@ -91,13 +91,13 @@ A curses library with wide char support (e.g. ncursesw), libreadline (optional) | Dependency | Installation | Operation | | --- | --- | --- | -| xdg-open (Linux), open(1) (macOS), cygstart (Cygwin) | base | desktop opener | +| xdg-open (Linux), open(1) (macOS), cygstart<br>(Cygwin), open (Haiku) | base | desktop opener | | file, coreutils (cp, mv, rm), xargs | base | file type, copy, move and remove | | tar, (un)zip [atool/bsdtar for more formats] | base | create, list, extract bzip2, (g)zip, tar | | archivemount, fusermount(3) | optional | mount, unmount archives | | sshfs, [rclone](https://rclone.org/), fusermount(3) | optional | mount, unmount remotes | | trash-cli | optional | trash files (default action: rm) | -| vlock (Linux), bashlock (macOS), lock(1) (BSD) | optional | terminal locker (fallback: [cmatrix](https://github.com/abishekvashok/cmatrix)) | +| vlock (Linux), bashlock (macOS), lock(1) (BSD),<br>peaclock (Haiku) | optional | terminal locker (fallback: [cmatrix](https://github.com/abishekvashok/cmatrix)) | | advcpmv (Linux) ([integration](https://github.com/jarun/nnn/wiki/Advanced-use-cases#show-cp-mv-progress)) | optional | copy, move progress | | `$VISUAL` (else `$EDITOR`), `$PAGER`, `$SHELL` | optional | fallback vi, less, sh | @@ -4551,6 +4551,11 @@ nochange: } } + if (!sb.st_size) { + printwait(messages[MSG_EMPTY_FILE], &presel); + goto nochange; + } + /* If NNN_USE_EDITOR is set, open text in EDITOR */ if (cfg.useeditor && #ifdef FILE_MIME_OPTS @@ -4565,11 +4570,6 @@ nochange: continue; } - if (!sb.st_size) { - printwait(messages[MSG_EMPTY_FILE], &presel); - goto nochange; - } - if (!regexec(&archive_re, dents[cur].name, 0, NULL, 0)) { r = get_input(messages[MSG_ARCHIVE_OPTS]); if (r == 'l' || r == 'x') { |