Kaynağa Gözat

Hover on dir and connect remote

master
Arun Prakash Jana 5 yıl önce
ebeveyn
işleme
36ae4b8250
Veri tabanında bu imza için bilinen anahtar bulunamadı GPG Anahtar Kimliği: A75979F35C080412
3 değiştirilmiş dosya ile 49 ekleme ve 33 silme
  1. +30
    -29
      README.md
  2. +7
    -1
      nnn.1
  3. +12
    -3
      src/nnn.c

+ 30
- 29
README.md Dosyayı Görüntüle

@@ -22,35 +22,36 @@


It runs smoothly on the Pi, [Termux](https://www.youtube.com/watch?v=AbaauM7gUJw) (Android), Linux, macOS, BSD, Haiku, Cygwin, WSL, across DEs and GUI utilities or a strictly CLI environment. It runs smoothly on the Pi, [Termux](https://www.youtube.com/watch?v=AbaauM7gUJw) (Android), Linux, macOS, BSD, Haiku, Cygwin, WSL, across DEs and GUI utilities or a strictly CLI environment.


Once installed (instructions below), visit the [Wiki](https://github.com/jarun/nnn/wiki). ## Black magic! :dark_sunglasses:

1. Load and filter thousands of files instantly
## Black magic! 2. Turbo navigate with automatic dir selection

3. Select files from anywhere (not just a single dir)
1. Turbo navigate with automatic dir selection 4. Run custom commands with custom hotkeys
2. Select files from anywhere (not just a single dir) 5. Edit and preview markdown, man page, html
3. Run custom commands with custom hotkeys 6. Open a file and auto-proceed to the next
4. Edit and preview markdown, man page, html quickly 7. Export (filtered) list of visible files
5. Open a file and auto-proceed to the next 8. Find files by mime-type and list in `nnn`
6. Export (filtered) list of files to a text file 9. Write a plugin in any language you know
7. Find files by mime-type and list in `nnn` 10. Configure the middle mouse click to do anything
8. Write a plugin in any language you know 11. Fuzzy search subtree and open the dir of a file
9. Configure the middle mouse click to do anything 12. Load four dirs with custom settings at once
10. Fuzzy search subtree and open the directory of a file 13. Show notifications on cp, mv completion
11. Load four dirs with custom settings at once 14. Auto-sync selection to system clipboard
12. Show notifications on cp, mv completion 15. Open text files detached in another pane/tab/window
13. Auto-sync selection to system clipboard 16. Create files/dirs/duplicates with parents (like `mkdir -p`)
14. Open text files detached in another pane/tab/window 17. Toggle hidden with <kbd>.</kbd>, go HOME with <kbd>~</kbd> or to the last dir with <kbd>-</kbd>
15. Create files/dirs/duplicates with parents (like `mkdir -p`) 18. Pin a frequently visited dir at runtime
16. Toggle hidden with <kbd>.</kbd>, go HOME with <kbd>~</kbd> or to the last dir with <kbd>-</kbd> 19. Mount any cloud storage service in a few keypresses
17. Pin a frequently visited directory at runtime 20. Mount and modify archives
18. Mount any cloud storage service in few keypresses 21. Filter filtered entries
19. Mount and modify archives 22. Sort files by access time and inode change time
20. Filter filtered entries 23. Access selection from another instance of `nnn`
21. Sort files by access time and inode change time 24. Compile out features you don't need
22. Access selection from another instance of `nnn` 25. Watch matrix text fly or read fortune messages
23. Compile out features you don't need 26. Configure it in 5 minutes!
24. Watch matrix text flying or read random fortune messages Once installed (instructions below), _**read the fine [manual](https://github.com/jarun/nnn/wiki)**_.
25. Configure it in 5 minutes!


## Features ## Features




+ 7
- 1
nnn.1 Dosyayı Görüntüle

@@ -252,7 +252,13 @@ There are 3 groups of keybinds to add files to selection:
A selection can be edited, copied, moved, removed, archived or linked. A selection can be edited, copied, moved, removed, archived or linked.
.Pp .Pp
Absolute paths of the selected files are copied to \fB.selection\fR file in Absolute paths of the selected files are copied to \fB.selection\fR file in
the config directory. the config directory. The selection file is shared between multiple program
instances. The most recent instance writing to the file overwrites the entries
from earlier writes. If you have 2 instances if
.Nm
\fIopen\fR in 2 panes of a terminal multiplexer, you can select in one pane and
use the selection (e.g. to copy or move) in the other pane (if the instance
doesn't have any local selection already).
.Pp .Pp
To edit the selection use the _edit selection_ key. Use this key to remove a To edit the selection use the _edit selection_ key. Use this key to remove a
file from selection after you navigate away from its directory. Editing doesn't file from selection after you navigate away from its directory. Editing doesn't


+ 12
- 3
src/nnn.c Dosyayı Görüntüle

@@ -539,7 +539,7 @@ static const char * const messages[] = {
"overwrite?", "overwrite?",
"'s'ave / 'l'oad / 'r'estore?", "'s'ave / 'l'oad / 'r'estore?",
"Quit all contexts?", "Quit all contexts?",
"remote name: ", "remote name ('-' for hovered): ",
"archive name: ", "archive name: ",
"open with: ", "open with: ",
"relative path: ", "relative path: ",
@@ -3892,7 +3892,7 @@ static bool archive_mount(char *path, char *newpath)
return TRUE; return TRUE;
} }


static bool remote_mount(char *newpath) static bool remote_mount(char *newpath, char *currentpath)
{ {
uchar flag = F_CLI; uchar flag = F_CLI;
int opt; int opt;
@@ -3928,6 +3928,15 @@ static bool remote_mount(char *newpath)
return FALSE; return FALSE;
} }


if (tmp[0] == '-' && !tmp[1]) {
if (!strcmp(cfgdir, currentpath) && ndents && (dents[cur].flags & DIR_OR_LINK_TO_DIR))
xstrlcpy(tmp, dents[cur].name, NAME_MAX + 1);
else {
printmsg(messages[MSG_FAILED]);
return FALSE;
}
}

/* Create the mount point */ /* Create the mount point */
mkpath(cfgdir, tmp, newpath); mkpath(cfgdir, tmp, newpath);
if (!xmktree(newpath, TRUE)) { if (!xmktree(newpath, TRUE)) {
@@ -5568,7 +5577,7 @@ nochange:
break; break;
} // fallthrough } // fallthrough
case SEL_REMOTE: case SEL_REMOTE:
if (sel == SEL_REMOTE && !remote_mount(newpath)) { if (sel == SEL_REMOTE && !remote_mount(newpath, path)) {
presel = MSGWAIT; presel = MSGWAIT;
goto nochange; goto nochange;
} }


||||||
x
 
000:0
Yükleniyor…
İptal
Kaydet