mirror of
https://github.com/jarun/nnn.git
synced 2025-01-15 21:36:42 +00:00
Enable hidden when opening a hidden file
This commit is contained in:
parent
117025c1a4
commit
197717ce68
|
@ -80,7 +80,7 @@ Runs on the Pi, [Termux](https://www.youtube.com/embed/AbaauM7gUJw) (Android), L
|
||||||
- Preview hovered files in FIFO-based previewer
|
- Preview hovered files in FIFO-based previewer
|
||||||
- Open with desktop opener or specify a custom opener
|
- Open with desktop opener or specify a custom opener
|
||||||
- File-specific colors (or minimal _dirs in context color_)
|
- File-specific colors (or minimal _dirs in context color_)
|
||||||
- Icons or Emojis support (customize and compile-in)
|
- Icons and Emojis support (customize and compile-in)
|
||||||
- Plugin for image, video and audio thumbnails
|
- Plugin for image, video and audio thumbnails
|
||||||
- Create, list, extract (to), mount (FUSE based) archives
|
- Create, list, extract (to), mount (FUSE based) archives
|
||||||
- Option to open all text files in `$EDITOR`
|
- Option to open all text files in `$EDITOR`
|
||||||
|
|
|
@ -8525,7 +8525,7 @@ int main(int argc, char *argv[])
|
||||||
initpath = startpath ? xstrdup(startpath) : getcwd(NULL, 0);
|
initpath = startpath ? xstrdup(startpath) : getcwd(NULL, 0);
|
||||||
if (!initpath)
|
if (!initpath)
|
||||||
initpath = "/";
|
initpath = "/";
|
||||||
} else {
|
} else { /* Open a file */
|
||||||
arg = argv[optind];
|
arg = argv[optind];
|
||||||
DPRINTF_S(arg);
|
DPRINTF_S(arg);
|
||||||
if (xstrlen(arg) > 7 && is_prefix(arg, "file://", 7))
|
if (xstrlen(arg) > 7 && is_prefix(arg, "file://", 7))
|
||||||
|
@ -8537,6 +8537,10 @@ int main(int argc, char *argv[])
|
||||||
return EXIT_FAILURE;
|
return EXIT_FAILURE;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/* If the file is hidden, enable hidden option */
|
||||||
|
if (*xbasename(initpath) == '.')
|
||||||
|
cfg.showhidden = 1;
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* If nnn is set as the file manager, applications may try to open
|
* If nnn is set as the file manager, applications may try to open
|
||||||
* files by invoking nnn. In that case pass the file path to the
|
* files by invoking nnn. In that case pass the file path to the
|
||||||
|
|
Loading…
Reference in a new issue