README.md | 2 +- src/nnn.c | 6 +++++- diff --git a/README.md b/README.md index 51a8bb8ab3fb501076fdf392884a58ddeb06e348..a08426f80ad64b63ddfc056b19434c6b02cd1867 100644 --- a/README.md +++ b/README.md @@ -80,7 +80,7 @@ - Mimes - Preview hovered files in FIFO-based previewer - Open with desktop opener or specify a custom opener - 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 - Create, list, extract (to), mount (FUSE based) archives - Option to open all text files in `$EDITOR` diff --git a/src/nnn.c b/src/nnn.c index 9e8c8aa081fdcbae9b4f88f570f4d1d37801800d..0d7e9d2ff1d55a813a2386e1ce2c0be42a4b0f4a 100644 --- a/src/nnn.c +++ b/src/nnn.c @@ -8525,7 +8525,7 @@ initpath = startpath ? xstrdup(startpath) : getcwd(NULL, 0); if (!initpath) initpath = "/"; - } else { + } else { /* Open a file */ arg = argv[optind]; DPRINTF_S(arg); if (xstrlen(arg) > 7 && is_prefix(arg, "file://", 7)) @@ -8536,6 +8536,10 @@ if (!initpath) { xerror(); 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