Git Product home page Git Product logo

nnn's Introduction

nnn
nnn - Supercharge your productivity!

Latest release Availability CircleCI Status GitHub CI Status Privacy Awareness License

nnn () is a full-featured terminal file manager. It's tiny, nearly 0-config and incredibly fast.

It is designed to be unobtrusive with smart workflows to match the trains of thought.

nnn can analyze disk usage, batch rename, launch apps and pick files. The plugin repository has tons of plugins to extend the capabilities further e.g. live previews, (un)mount disks, find & list, file/dir diff, upload files. A patch framework hosts sizable user-submitted patches which are subjective in nature.

Independent (neo)vim plugins - nnn.vim, vim-floaterm nnn wrapper and nnn.nvim (neovim exclusive).

Runs on the Pi, Termux (Android), Linux, macOS, BSD, Haiku, Cygwin, WSL, across DEs or a strictly CLI env.

(there's more)

Features

  • Quality
    • Privacy-aware (no unconfirmed user data collection)
    • POSIX-compliant, follows Linux kernel coding style
    • Highly optimized, static analysis integrated code
  • Frugal
    • Typically needs less than 3.5MB resident memory
    • Works with 8 colors (and xterm 256 colors)
    • Disk-IO sensitive (few disk reads and writes)
    • No FPU usage (all integer maths, even for file size)
    • Minimizes screen refresh with fast line redraws
    • Tiny binary (typically around 100KB)
    • 1-column mode for smaller terminals and form factors
    • Hackable - compile in/out features and dependencies
  • Portable
    • Language-agnostic plugins
    • Static binary available (no need to install)
    • Minimal library deps, easy to compile
    • No config file, minimal config with sensible defaults
    • Plugin to backup configuration
    • Widely available on many packagers
    • Touch enabled, handheld-friendly shortcuts
    • Unicode support
  • Modes
    • Light (default), detail
    • Disk usage analyzer (block/apparent)
    • File picker, (neo)vim plugin
  • Navigation
    • Filter with automatic dir entry on unique match
    • Type-to-nav (turbo navigation/always filter) mode
    • Contexts (aka tabs/workspaces) with custom colors
    • Sessions, bookmarks, mark and visit a dir
    • Remote mounts (needs sshfs, rclone)
    • Familiar shortcuts (arrows, ~, -, @), quick look-up
    • cd on quit (easy shell integration)
    • Proceed to next file on file open and selection
  • Search
    • Instant filtering with search-as-you-type
    • Regex (POSIX/PCRE) and string (default) filters
    • Subtree search plugin to open or edit files
  • Sort
    • Ordered pure numeric names by default (visit /proc)
    • Case-insensitive version (aka natural) sort
    • By name, access/change/mod (default) time, size, extn
    • Reverse sort
    • Directory-specific ordering
  • 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 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
  • Convenience
    • Detailed file stats and mime information
    • Run plugins and custom commands with hotkeys
    • FreeDesktop compliant trash utility integration
    • Cross-dir file/all/range selection
    • Create (with parents), rename, duplicate files and dirs
    • Create new file or directory (tree) on startup
    • Batch renamer for selection or dir
    • List input stream of file paths from stdin or plugin
    • Copy (as), move (as), delete, archive, link selection
    • Dir updates, notification on cp, mv, rm completion
    • Copy file paths to system clipboard on select
    • Launch apps, run commands, spawn a shell, toggle exe
    • Access context paths/files at prompt or spawned shell
    • Lock terminal after configurable idle timeout
    • Capture and show output of a program in help screen
    • Basic support for screen readers and braille displays

Quickstart

  1. Install nnn and the dependencies you need.
  2. The desktop opener is default. Use -e to open text files in the terminal. Optionally open detached.
  3. Configure cd on quit.
  4. Sync subshell $PWD to nnn.
  5. Install plugins.
  6. Use -x to sync selection to clipboard, show notis on cp, mv, rm and set xterm title.
  7. For a CLI-only environment, set NNN_OPENER to nuke. Use option -c.
  8. Bid ls goodbye! alias ls='nnn -de' 😎
  9. Visit the Live previews and Troubleshooting Wiki pages.

Don't memorize! Arrows, /, q suffice. Tab creates and/or cycles contexts. ? lists shortcuts.

Wiki

Videos

Elsewhere

Developers

Visit the Tracker thread for a list of features in progress and anything up for grabs. Feel free to discuss new ideas or enhancement requests.

nnn's People

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

nnn's Issues

Add a config file

Would it be possible to add a config file, for people who preferred that style of configuration? I find environment variables a bit cumbersome, personally.

Keybinds ^S and ^Q stop working

Reproduction steps:

Keybinds are lost in the following case:

  • start nnn
  • navigate to a different directory
  • spawn a shell
  • exit the shell
  • ^S and ^Q stop working

The issue happens only with the 'special' keybinds like ^S, ^Q, ^Z... which get their original shell interpretation back.

Selector randomly jumps up

Building from HEAD on nixOS.
I have a weird bug which makes the 'current selection' jump up several entries randomly, without any input. Reproduced with different emulators and in a tty.

no version information available (required by nnn)

I'm getting the following warning messages:

nnn: /lib/x86_64-linux-gnu/libncurses.so.5: no version information available (required by nnn)
nnn: /lib/x86_64-linux-gnu/libtinfo.so.5: no version information available (required by nnn)

Installed from the Ubuntu PPA

Environment:

3.13.0-115-generic #162-Ubuntu SMP Fri Mar 24 16:03:51 UTC 2017 x86_64 x86_64 x86_64 GNU/Linux

Unable to escape rename file

I tried to rename a file with ^r. I pressed backspace key and it produces an ^? character instead of deleting, so I wanted to cancel renaming, but was unable to. Can we get a feature to cancel renaming with ESC key for example?

[Bug] Invisible Icon Files on Mac Not Displayed

In folders for which a custom icon is set, the Icon\r / Icon? / Icon^M^M file within is not properly displayed. It is accounted for in the total at the bottom but it looks like a blank entry in the list, both with dotfile display on or off.
nnn
Moving the cursor down one entry:
nnn2
The entry is invisible both on Mavericks and on latest Sierra.

Size is not showing correctly

Steps to reproduce:

  1. Create the file:

    fallocate -l 154140260 out.file
    
  2. Check the file size in nnn:

    2018-03-04 22:02 146.100M  out.file
    
  3. Check the file size in v1.7:

    2018-03-04 22:02  147.00M  out.file
    

154140260 / (1024*1024) = 146.999607

So 147.00M is the correct approximate size.

The regression was introduced by 7be0726.

Install error "curses.h: No such file or directory"

cc -O3 -march=native -Wall -Wextra -Wno-unused-parameter -o nnn nnn.c -lcurses
nnn.c:8:20: fatal error: curses.h: No such file or directory
compilation terminated.
Makefile:22: recipe for target 'nnn' failed
make: *** [nnn] Error 1

nnn-1.5: error when compiling to musl-based systems

Trying to compile and cross-compile musl-based systems causes the following error

==> nnn_x86_64-musl_do_build.log
x86_64-linux-musl-gcc -specs=/void-packages/common/environment/configure/gccspecs/hardened-cc1  -fstack-protector-strong -D_FORTIFY_SOURCE=2  -O2 -pipe -mtune=generic   -I/usr/x86_64-linux-musl/usr/include -o nnn nnn.c -specs=/void-packages/common/environment/configure/gccspecs/hardened-ld -Wl,-z,relro -Wl,-z,now -Wl,--as-needed     -L/usr/x86_64-linux-musl/usr/lib -lreadline -lncursesw
nnn.c:203:2: error: unknown type name ‘ushort’
  ushort filtermode : 1;  /* Set to enter filter mode */
  ^~~~~~
nnn.c:204:2: error: unknown type name ‘ushort’
  ushort mtimeorder : 1;  /* Set to sort by time modified */
  ^~~~~~
nnn.c:205:2: error: unknown type name ‘ushort’
  ushort sizeorder  : 1;  /* Set to sort by file size */
  ^~~~~~
nnn.c:206:2: error: unknown type name ‘ushort’
  ushort blkorder   : 1;  /* Set to sort by blocks used (disk usage) */
  ^~~~~~
nnn.c:207:2: error: unknown type name ‘ushort’
  ushort showhidden : 1;  /* Set to show hidden files */
  ^~~~~~
nnn.c:208:2: error: unknown type name ‘ushort’
  ushort showdetail : 1;  /* Clear to show fewer file info */
  ^~~~~~
nnn.c:209:2: error: unknown type name ‘ushort’
  ushort showcolor  : 1;  /* Set to show dirs in blue */
  ^~~~~~
nnn.c:210:2: error: unknown type name ‘ushort’
  ushort dircolor   : 1;  /* Current status of dir color */
  ^~~~~~
nnn.c:211:2: error: unknown type name ‘ushort’
  ushort metaviewer : 1;  /* Index of metadata viewer in utils[] */
  ^~~~~~
nnn.c:212:2: error: unknown type name ‘ushort’
  ushort color      : 3;  /* Color code for directories */
  ^~~~~~
make: *** [Makefile:26: nnn] Error 1

adding #include <sys/types.h> to nnn.c seems to fix the problem with ushort and compilation ( and cross-compilation ) works correctly

Open in New Window

I am trying to create a new window feature using the o shortcut.

I have added the following code to my .bashrc:
export NNN_DE_FILE_MANAGER=nnnn

where nnnn is an executable script:

urxvt -e nnn $1

When I press o , it says: NNN_DE_FILE_MANAGER not set.

Monitor directory changes with filtering enabled

It doesn't seem to work as of 1.4. Should it?

Steps to reproduce:

  1. Run nnn
  2. Use a filter, e.g. against .png files
  3. Open one file
  4. Delete the file from within picture viewer
  5. Close picture viewer
  6. Scroll down to the file you've just deleted and try to open it

What's expected:

  1. The file disappeared from the filtered list

Set up Homebrew tap

To set up a Homebrew tap, create a repository at jarun/homebrew-nnn, place the single file nnn.rb in it:

class Nnn < Formula
  desc "Free, fast, friendly file browser"
  homepage "https://github.com/jarun/nnn"
  url "https://github.com/jarun/nnn/archive/v1.0.tar.gz"
  sha256 "dd33f1001a87a427f10b6468db7dcba0bdc19643f121dbf6bb8655d5f2d3bac5"

  def install
    # Remove when Makefile is fixed
    inreplace "Makefile", "$(PREFIX)/man", "$(PREFIX)/share/man"
    system "make", "install", "PREFIX=#{prefix}"
  end

  test do
    touch "foobar"
    # Testing this curses app requires a pty
    require "pty"
    PTY.spawn(bin/"nnn") do |r, w, pid|
      w.write "q"
      assert_match "foobar", r.read
    end
  end
end

add an optional README if you want to, but Homebrew/Linuxbrew users who just do

brew install jarun/nnn

won't see the README.

Include scripts in package

Hello,
in your next release, can you include scripts files (or at least scripts/quitcd/quitcd.*) in the packaged source?

This way it's easier to source directy into the shell an eventually updated version of the script.

My personal usecase is that with homebrew on MacOS, adding source $(brew --prefix nnn)/scripts/quitcd/quitcd.bash on my .bash_profile is all it takes to enable the cd on quit feauture.

nnn crashes with max chars in file name

The following file name cannot be shown:

max_chars_filename_xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx

nnn crashes immediately.

cd on quit not working . .

. . on Mint 18.1 x64 Cinnamon, using nnn 1.0-3.

I did jump through the necessary hoops, to wit: added the code to my bash.rc file (and indeed I tried it in a user rc file and a system one); invokved nnn not with nnn but with n; started a new terminal. Also, I tried using nnn's cd command rather than just navigating folders. But when I exit the program, my terminal remains in the folder it started.

Feature request: File actions

For actions such as file deletion, you say that you one should use the clipboard. However, this does not work well when you SSH to a machine. While you state that the tool is intended to be used in a DE, it could be very useful in pure shell environment if you consider adding an alternative workflow. It was also mentioned on Hacker News that the deletion workflow is very common.

Maybe you should consider adding a tiny bit of complexity to allow more customizations. You already have system in place with the scripts directory. Maybe you should consider adding a bit of complexity; for example, the default keybindins might not suit all users. If you add some kind of configuration file for keybindings, one could map actions of keys such as "x" to a file deletion script, maybe it even asks for confirmation with readline or something. This still seems to be reasonably simple to me and is just a suggestion to add some flexibility.

Nothing is suits everyone, but nnn would seem to be reasonable alternative to mc/ranger/fzf if one could adapt it a bit more to specific needs. This is just a suggestion, but I mainly wanted to express that the clipboard workflow is not very useable in all scenarios such as when using SSH. Then one would need to use different tools.

ToDo list

Rolled from #1.

Feel free to suggest new features to add to the list below. Some of the features may still be master-only.

  • ssh and scp support
  • support terminal locking on OS X (any vlock replacement?)
  • run any number of scripts
  • prefer VISUAL over EDITOR
  • add a keybind to run a custom script (see #79)
  • integer get_coolsize() (thanks @arsv)
  • batch rename, move, delete files with vidir integration
  • copy file paths when X is unavailable
  • support copying multiple file names to copier
  • add open with... shortcut
  • add option to open bookmark directly
  • optimize memory usage and algorithms for file name handling
  • list and extract archives
  • show current selection number along with total entries in dir
  • support NNN_NOWAIT to unblock nnn (DE specific)
  • file and directory creation
  • change to light mode if number of cols < 35
  • in-place file rename
  • watch out for current dir changes (if not in filter or du mode)
  • pin and jump to a directory
  • show vol capacity and vol free in help
  • option to use exiftool instead of mediainfo
  • option to show dirs in custom color (default: enabled in blue)
  • show dir content size and number of files in du mode
  • support bookmarks string
  • add option to support opening text files in EDITOR
  • use xdg-open on Linux and open(1) on OS X as desktop opener
  • support multiple apps in nlay
  • use vlock as default terminal screensaver
  • navigate-as-you-type mode
  • subtree search (using gnome-search-tool or catfish)
  • support custom nlay
  • search-as-you-type at filter prompt
  • RPM packages for RHEL/CentOS (thanks @fennm)
  • support cd ..... (with . as PWD, stops at /)
  • jump to initial directory (where nnn was started)
  • nlay - a shell script for actions like open desktop search utility, run screensaver
  • show file details, mediainfo output, help in less
  • show media information (needs mediainfo)
  • support readline at chdir prompt
  • use Q to quit to current dir (needs external shell integration)
  • use ^Q to quit (even from filter mode)
  • UTF-8 support
  • add option to start in disk usage analyzer mode
  • open current dir in desktop file manager
  • disk usage analyzer more
  • show unprivileged free blocks in du mode
  • shortcut - to jump to last directory
  • resolve ~ (HOME) at chdir prompt
  • option to show complete stats of just the current entry (name, file type, human readable permission string, byte size... all lstat() details)
  • update noice man page
  • sort entries by size
  • support file path copier script (NNN_COPIER)
  • support detail view (default)
    • file type
    • modification time
    • human-readable file size
    • current item in reverse video
    • full name of currently selected file in bottom "bar"
  • roll navigation with Up and Down at the first and last entries
  • remove restriction on visiting parent dir when opened with a relative dir path
  • case insensitive alphabetic content listing
  • generate optimized binary
  • show total number of files in du mode (apparently it has to be counted in nftw callback, with adjustments like file type check, hardlink check, which means unreasonable overhead)
  • threaded/multicore nftw(3) (overkill, we are already very fast)
  • use scandir instead of readdir (we are using custom alphanum sort, see 6912912)
  • modify packagecore.yml and probably Makefile to generate OpenSUSE Leap package

Anything else which would add value (please discuss in this thread)

Port nnn to OpenBSD

Hello,

It is an announcement rather than an issue or feature request.

I have started work on porting nnn to OpenBSD. Good news is that it compiles (done manually both from master and release tarball) and runs. I'm pretty sure that there will be few bumps to navigate so I'll keep you posted on progress and (possible) issues.

Cheers

nnn functions strangely when being used in /tmp

If I run nnn inside /tmp, on MacOS Sierra, the display seems to function at first. However if you use the arrow keys then the display becomes corrupted and seems to not function (see below). It works fine in the same terminal when run from my home directory, or the root directory.

image

usability feedback on ?

I just tried it out. I think its pretty cool but I expected ? to toggle the help page but once displayed I had to mess around with a few commands until I finally figured out how to exit with Q (). It would be nice if it was toggled with ?

Discussion on nnn first release

@zmwangx @shaggytwodope @szlin

I am thinking of making the first release of nnn. As usual, I'ld need your valuable guidance and help. Here are the points/questions I have in mind:

  • I am skipping a config file. With the env vars like NNN_OPENER, the fallback, desktop file manager opener (pushed it today) I don't think we really need it. It's as good as having the desktop in the terminal.
  • We have -march=native in the Makefile. Can we package with this option?
  • No auto-generated packages this time. @shaggytwodope already has a ppa and AUR is his forte too.
  • @szlin please submit this to Debian.
  • @zmwangx please confirm if 9702abd works on OS X. Would you mind submitting this to Homebrew?
  • Shall we start with v1.0?
  • Please share anything else that comes to your mind.

You'll find the new features in nnn here.

I cant make install

I am having this error in Arch ..

In the GNU C Library, "major" is defined
by <sys/sysmacros.h>. For historical compatibility, it is
currently defined by <sys/types.h> as well, but we plan to
remove this soon. To use "major", include <sys/sysmacros.h>
directly. If you did not intend to use a system-defined macro
"major", you should undefine it after including <sys/types.h>.

Extension-less files not supported?

When I hit Return on files like CHANGELOG or Makefile, I get "No file association".

  • Should such files be attempted to be opened as plain text?
  • Or may be a check should be made if a file is plain text (something like this?)
    • I don't know how that would be done in a C code, but something like that should be available.

Buffer overflow in "safe" strncpy usage

@Duncaen pointed out a buffer overflow at https://lobste.rs/s/0zcez1/nnn_missing_terminal_file_browser_for_x#c_dfkmqo

/* Just a safe strncpy(3) */
static void
xstrlcpy(char *dest, const char *src, size_t n)
{
	strncpy(dest, src, n - 1);
	dest[n - 1] = '\0';
}
...
xstrlcpy(cmd + strlen(cmd), newpath, strlen(newpath) + 1);
xstrlcpy(buf + strlen(buf), fpath, strlen(fpath) + 1);
...

First example is a buffer overflow if the user sets an NNN_OPENER environment variable to > 1024 chars

Second example isn't an overflow, as buf length is fpath length + 16 and initially filled with something less than 15 chars. It would be easy to carelessly modify this line or the previous lines to cause a buffer overflow though.

Open new programs not as child of nnn?

I really like how fast it is to browse directories with nnn and I would like to use it as my main file manager, but I have a small problem and I don't know if there is a configuration to solve it.
When using nnn if, for example, I open a pdf using enter then evince is started with the opened file. If then I close the terminal containing nnn evince is killed too. Is there a way to keep programs started by nnn opened when closing nnn?
Thank you for your work!

What is “change directory on exit” supposed to do?

I naively though (or wish) “change directory on exit” mean if i quit using “Q” then the shell will automatically go the directory I was in with nnn, but it does not seems to work.

So I wonder if that’s me not understanding what it means or me not correctly running nnn.

By the way, if this is supposed to indeed change the caller shell directory, then I wonder how this can be achieved.

I’m using Nnn 1.5 on Ubuntu Xenial 32 bits.

[bug] Negative values in disk usage mode

Aug 18 13:24 2015 -1996095/ iphone/
Apr 01 21:11 2017 522.66M/ music/
Jul 03 18:08 2012 -1666539/ movies/
Feb 14 12:10 2017 -1369174/ scene/
Jun 29 14:56 2016 1.944G/ Project/
Apr 16 10:51 2017 1.618G/ video/

Subtree-search

I would like to have this feature coming with nnn. However, I don't want to rewrite locate and don't want to do an on-the-fly match every time (to make it smarter and faster we would need much more than a brute-force search).

The best option is a GUI utility that we can invoke. We use NAME_MAX chars for each dir entry, to show subtrees we'll have to bump it to PATH_MAX. They we would have to render those, make changes in the interface, making life harder than it should be. I have already updated a defect on fsearch I raised on a similar line. However, I am not sure if it would be accepted or would be possible with minimal changes in fsearch.

Opening this defect for suggestions on any similar search utility you guys are aware of.

@zmwangx @shaggytwodope @szlin @fennm

nftw(3) crashes with latest libc

reproduction: press S is any directory to run in du mode.

libc6 versions: 2.23-0ubuntu9 (and the previous one)
kernel: 4.4.0-87-generic (4.4.0.87.93) amd64

output:

Calculating...
              Program received signal SIGSEGV, Segmentation fault.
                                                                  0x00007ffff7468579 in ?? () from /lib/x86_64-linux-gnu/libc.so.6

backtrace:

(gdb) bt full
#0  0x00007ffff7468579 in ?? () from /lib/x86_64-linux-gnu/libc.so.6
No symbol table info available.
#1  0x0000000000402b99 in dentfill (dents=0x614280 <dents>, filter=<optimized out>, re=0x60dc80 <re>, path=0x7fffffff9cc0 "/home/vaio/GitHub/nnn") at nnn.c:1660
        fd = 4
        namep = 0x74b473 "redhat"
        dentp = 0x746c20
        dirp = 0x74b430
        sb = {st_dev = 2050, st_ino = 3285019, st_nlink = 2, st_mode = 16893, st_uid = 1001, st_gid = 1001, __pad0 = 0, st_rdev = 0, st_size = 4096, st_blksize = 4096, st_blocks = 8, 
          st_atim = {tv_sec = 1500917387, tv_nsec = 310109830}, st_mtim = {tv_sec = 1500917387, tv_nsec = 310109830}, st_ctim = {tv_sec = 1500917387, tv_nsec = 310109830}, __glibc_reserved = {
            0, 0, 0}}
        n = 0
#2  populate (fltr=0x7fffffff84c0 "^[^.]", oldpath=0x7fffffffacc0 "/home/vaio/GitHub/nnn/misc", path=0x7fffffff9cc0 "/home/vaio/GitHub/nnn") at nnn.c:1732
        re = {buffer = 0x742510 " \331s", allocated = 224, used = 224, syntax = 4436732, fastmap = 0x742400 '\001' <repeats 46 times>, translate = 0x0, re_nsub = 0, can_be_null = 0, 
          regs_allocated = 0, fastmap_accurate = 1, no_sub = 1, not_bol = 0, not_eol = 0, newline_anchor = 0}
#3  browse (ifilter=0x406c6b "^[^.]", ipath=0x7fffffff8cc0 "/home/vaio/GitHub/nnn") at nnn.c:1871
        newpath = '\000' <repeats 4095 times>
        fltr = "^[^.]", '\000' <repeats 2042 times>
        dir = <optimized out>
        env = <optimized out>
        tgt = 0x0
        path = "/home/vaio/GitHub/nnn", '\000' <repeats 4074 times>
        r = <optimized out>
        sel = <optimized out>
        lastdir = '\000' <repeats 664 times>...
        tmp = <optimized out>
        run = <optimized out>
        fd = <optimized out>
        oldpath = "/home/vaio/GitHub/nnn/misc", '\000' <repeats 4069 times>
        sb = {st_dev = 0, st_ino = 0, st_nlink = 0, st_mode = 0, st_uid = 0, st_gid = 0, __pad0 = 0, st_rdev = 0, st_size = 0, st_blksize = 0, st_blocks = 0, st_atim = {tv_sec = 0, 
            tv_nsec = 0}, st_mtim = {tv_sec = 0, tv_nsec = 0}, st_ctim = {tv_sec = 0, tv_nsec = 0}, __glibc_reserved = {0, 0, 0}}
        presel = 0
#4  main (argc=<optimized out>, argv=<optimized out>) at nnn.c:2569
        cwd = "/home/vaio/GitHub/nnn", '\000' <repeats 4074 times>
        ipath = 0x7fffffff8cc0 "/home/vaio/GitHub/nnn"
        ifilter = <optimized out>
        bmstr = <optimized out>
        opt = <optimized out>
(gdb)

Could you add Chinese support?

Hi Jarun,

I found this project thru reddit , and I like the user interface and short cuts.

But the Chinese file name does not display correctly. After googling, I made some changes to the files and it works. However my solution is to replace curses with ncursesw in Makefile which may bring the change to the overall design.

The changes I made to support Chinese in my computer were:

  • Makefile
-LDLIBS = -lcurses
+LDLIBS = -lncursesw
  • nnn.c
    move below line 'setlocale(LC_ALL, "") ' before 'initscr()'

Thank you for this great project!
wugq

uneven splitting of codepoints

correct
jumbled

As per the above screenshots the codepoints on the edges of the terminal session are messed up because the number of columns "breaks-through" the code points.

Consider changing the way file openers are chosen

Currently the only way to set file openers is before compiling or diving into specific toolsets like xdg.
While easy and documented, once this gets into repositories of non-source based distributions people won't manually rebuild the package in order to change some settings.
What do you think of the way ranger handles file openers ?

Keyboard interrupts do not work when using -s

If you run nnn -s, you cannot use ctrl+c to terminate nnn when it is calculating the sizes (on MacOS at least). This ias annoying if you're running it over a huge directory and wish to terminate it.

ToDo list

Feel free to suggest new features to add to the list below. Some of the features may still be master-only.

  • list and extract archives
  • show current selection number along with total entries in dir
  • support NNN_NOWAIT to unblock nnn (DE specific)
  • file and directory creation
  • change to light mode if number of cols < 35
  • in-place file rename
  • watch out for current dir changes (if not in filter or du mode)
  • pin and jump to a directory
  • show vol capacity and vol free in help
  • option to use exiftool instead of mediainfo
  • option to show dirs in custom color (default: enabled in blue)
  • show dir content size and number of files in du mode
  • support bookmarks string
  • add option to support opening text files in EDITOR
  • use xdg-open on Linux and open(1) on OS X as desktop opener
  • support multiple apps in nlay
  • use vlock as default terminal screensaver
  • navigate-as-you-type mode
  • subtree search (using gnome-search-tool or catfish)
  • support custom nlay
  • search-as-you-type at filter prompt
  • RPM packages for RHEL/CentOS (thanks @fennm)
  • support cd ..... (with . as PWD, stops at /)
  • jump to initial directory (where nnn was started)
  • nlay - a shell script for actions like open desktop search utility, run screensaver
  • show file details, mediainfo output, help in less
  • show media information (needs mediainfo)
  • support readline at chdir prompt
  • use Q to quit to current dir (needs external shell integration)
  • use ^Q to quit (even from filter mode)
  • UTF-8 support
  • add option to start in disk usage analyzer mode
  • open current dir in desktop file manager
  • disk usage analyzer more
  • show unprivileged free blocks in du mode
  • shortcut - to jump to last directory
  • resolve ~ (HOME) at chdir prompt
  • option to show complete stats of just the current entry (name, file type, human readable permission string, byte size... all lstat() details)
  • update noice man page
  • sort entries by size
  • support file path copier script (NNN_COPIER)
  • support detail view (default)
    • file type
    • modification time
    • human-readable file size
    • current item in reverse video
    • full name of currently selected file in bottom "bar"
  • roll navigation with Up and Down at the first and last entries
  • remove restriction on visiting parent dir when opened with a relative dir path
  • case insensitive alphabetic content listing
  • generate optimized binary
  • show total number of files in du mode (apparently it has to be counted in nftw callback, with adjustments like file type check, hardlink check, which means unreasonable overhead)
  • threaded/multicore nftw(3) (overkill, we are already very fast)
  • use scandir instead of readdir (we are using custom alphanum sort, see 6912912)
  • anything else which would add value (please discuss in this thread)

keyboards without INSERT key

Search as you type is invoked on INSERT key. But many keyboards (bluetooth keyboards) don't have this key. Is there any other alternative to accessing this mode? (I am on Mac OS Sierra). Thanks.

edit: I am aware of the -i flag, and that I can go into this mode by pressing / but then i come out immediately.

I have checked various articles on simulating the INSERT key (such as Fn+ENTER, fn+i, etc but none are working. Could you give another key in addition, something unused, that you don't intend using in the foreseeable future.). I can suggest Ctrl-s but i don't know all the key mappings off-hand.

Not showing big files

Hello. I am using Debian Unstable i386. For some reason nnn do not show big files (1.5G is ok, but ≈4G and more is not). I thought it may be some ntfs issue, but it's not.
I can see these files with ls and ncdu.

Issue with the pager (not sure it’s NNN related)

It seems random, I can’t tell how to reproduce, but I noticed output from NNN using the pager, which is Less for me, often starts with a truncated display, sometime scrolling redraw the part left blank, but sometimes too, it has issue with scrolling. It seems to not know how many lines are available for output. As an example, I may have to retry Shift-F multiple times on an archive to be able to list its content properly.

I can’t tell it it’s an issue with Less or with NNN. What’s sure, is that Less works normally outside of NNN.

Absolute path issue

Hi there!

I really like the simplicity of the nnn, but I have a problem with absolute paths. I work on macOS with fish shells.

My configuration file:

~/.config/fish/config.fish
export NNN_COPIER="copier.sh"

~/.config/fish/copier.sh

#!/bin/sh
greadlink -m $1 | pbcopy

2017-11-27 at 08 49 49

It looks like the file path to the file was copied correctly (see picture above), but when I press ! and then the ctrl-shift-v shortcut, copied absolute path is not pasted.

Is this nnn error or my configuration?

Regards!

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.