nnn/README.md

169 lines
8.9 KiB
Markdown
Raw Normal View History

2019-11-25 21:15:35 +05:30
<h1 align="center">nnn - <i>type less, do more, wayyy faster</i></h1>
2016-08-20 21:57:14 +05:30
2017-04-14 23:16:01 +05:30
<p align="center">
<a href="https://github.com/jarun/nnn/releases/latest"><img src="https://img.shields.io/github/release/jarun/nnn.svg?maxAge=600" alt="Latest release" /></a>
2019-01-29 00:35:37 +05:30
<a href="https://repology.org/metapackage/nnn"><img src="https://repology.org/badge/tiny-repos/nnn.svg" alt="Availability"></a>
2019-04-13 14:24:59 +05:30
<a href="https://travis-ci.org/jarun/nnn"><img src="https://img.shields.io/travis/jarun/nnn/master.svg?label=travis" alt="Travis Status" /></a>
<a href="https://circleci.com/gh/jarun/workflows/nnn"><img src="https://img.shields.io/circleci/project/github/jarun/nnn.svg?label=circleci" alt="CircleCI Status" /></a>
2019-12-16 05:55:15 +05:30
<a href="https://en.wikipedia.org/wiki/Privacy-invasive_software"><img src="https://img.shields.io/badge/privacy-✓-crimson" alt="Privacy Awareness" /></a>
2017-04-14 23:16:01 +05:30
<a href="https://github.com/jarun/nnn/blob/master/LICENSE"><img src="https://img.shields.io/badge/license-BSD%202--Clause-yellow.svg?maxAge=2592000" alt="License" /></a>
2019-12-16 05:55:15 +05:30
<a href="https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=RMLTQ76JSXJ4Q"><img src="https://img.shields.io/badge/PayPal-donate-1eb0fc.svg" alt="Donate via PayPal!" /></a>
</p>
2019-10-01 04:30:58 +05:30
<p align="center"><a href="https://www.youtube.com/watch?v=U2n5aGqou9E"><img src="https://i.imgur.com/MPWpmos.png" /></a></p>
<p align="center"><i>navigate-as-you-type & du (click to see demo video)</i></p>
2016-08-21 17:37:18 +05:30
2019-08-09 10:28:14 +05:30
## Introduction
2019-07-30 04:57:59 +05:30
2019-11-30 20:07:11 +05:30
`nnn` is a full-featured terminal file manager. It's tiny and nearly 0-config with an [incredible performance](https://github.com/jarun/nnn/wiki/Performance).
2019-07-30 04:57:59 +05:30
2019-12-09 07:43:20 +05:30
`nnn` is also a du analyzer, an app launcher, a batch renamer and a file picker. The [plugin repository](https://github.com/jarun/nnn/tree/master/plugins#nnn-plugins) has tons of plugins and documentation to extend the capabilities further. You can _plug_ new functionality _and play_ with a custom keybind instantly. There's an independent [(neo)vim plugin](https://github.com/mcchrish/nnn.vim).
2019-11-30 20:07:11 +05:30
It runs smoothly on the Raspberry Pi, Termux [on Android](https://www.youtube.com/watch?v=AbaauM7gUJw), Linux, macOS, BSD, Cygwin, WSL and works seamlessly with DEs and GUI utilities.
2019-09-27 08:44:52 +05:30
2019-12-14 19:00:09 +05:30
Visit the [Wiki](https://github.com/jarun/nnn/wiki) for concepts, program usage, how-tos and troubleshooting.
2019-07-30 04:57:59 +05:30
2019-08-09 10:28:14 +05:30
## Features
2017-04-21 09:00:46 +05:30
2018-11-11 23:20:16 +05:30
- Modes
2019-09-15 22:32:44 +05:30
- Light (default), detail
2019-03-23 04:57:21 +05:30
- Disk usage analyzer (block/apparent)
2019-03-24 22:01:15 +05:30
- File picker, (neo)vim plugin
2017-05-15 22:29:40 +05:30
- Navigation
2019-08-20 20:00:48 +05:30
- *Navigate-as-you-type* with dir auto-select
2019-10-24 12:48:12 +05:30
- Contexts (_aka_ tabs/workspaces) with custom colors
2019-10-19 04:01:46 +05:30
- Sessions, bookmarks; pin and visit a dir
2019-11-25 07:50:22 +05:30
- Remote mounts (needs sshfs, rclone)
2019-10-12 09:48:58 +05:30
- Familiar shortcuts (arrows, <kbd>~</kbd>, <kbd>-</kbd>, <kbd>@</kbd>), quick reference
2019-09-26 21:51:38 +05:30
- CD on quit (*easy* shell integration)
2018-03-18 16:18:30 +05:30
- Sorting
2019-07-14 23:00:14 +05:30
- Ordered pure numeric names by default (visit _/proc_)
- Case-insensitive version (_aka_ natural) sort
2019-08-30 20:55:23 +05:30
- By file name, modification/access time, size, extension
2017-05-15 22:29:40 +05:30
- Search
2018-11-11 23:20:16 +05:30
- Instant filtering with *search-as-you-type*
2019-12-14 14:06:00 +05:30
- Regex and substring (default) matches
2019-04-27 18:15:18 +05:30
- Subtree search to open or edit files (using plugin)
2017-05-15 22:29:40 +05:30
- Mimes
2018-11-11 23:20:16 +05:30
- Open with desktop opener or specify a custom app
2019-10-12 02:13:08 +05:30
- Create, list, extract, mount (FUSE based) archives
2019-04-30 08:36:55 +05:30
- Option to open all text files in EDITOR
2017-05-15 22:29:40 +05:30
- Information
2019-04-30 08:36:55 +05:30
- Detailed file information
2019-08-28 00:00:52 +05:30
- Media information (using plugin)
2017-05-15 22:29:40 +05:30
- Convenience
2019-10-24 12:48:12 +05:30
- Run plugins and commands with custom keybinds
2019-03-09 09:05:32 +05:30
- FreeDesktop compliant trash (needs trash-cli)
2019-10-24 06:56:15 +05:30
- Cross-dir file/all/range selection
2019-12-03 06:10:32 +05:30
- Batch renamer (feature-limited) for selection or dir
2019-10-15 03:47:57 +05:30
- Copy (as), move (as), delete, archive, link selection
2019-12-12 00:56:39 +05:30
- Notification on cp, mv, rm completion
- Copy file paths to system clipboard on select
- Create (with parents), rename, duplicate (anywhere) files and dirs
2019-12-09 07:43:20 +05:30
- Launch GUI apps, run commands, execute file, spawn a shell
2019-11-24 02:13:27 +05:30
- Hovered file set as `$nnn` at prompt and spawned shell
2019-09-26 19:56:43 +05:30
- Lock terminal (needs a locker)
2019-11-30 04:39:38 +05:30
- Privacy-aware (no unconfirmed user data collection)
2019-11-30 20:07:11 +05:30
- Minimal deps, minimal config (with sensible defaults)
2019-09-29 08:02:40 +05:30
- Widely available
2017-05-11 22:25:22 +05:30
- Unicode support
2019-02-23 15:03:22 +05:30
- Follows Linux kernel coding style
2018-11-13 09:21:21 +05:30
- Highly optimized, static analysis integrated code
2017-03-29 11:03:22 +05:30
2019-09-26 05:46:06 +05:30
## Quickstart
1. Install the [utilities you may need](https://github.com/jarun/nnn#utility-dependencies) based on your regular workflows.
2. Configure [cd on quit](https://github.com/jarun/nnn/wiki/Basic-use-cases#configure-cd-on-quit).
2019-12-20 00:35:58 +05:30
3. Optionally open all text files in `$VISUAL` (else `$EDITOR`, fallback vi): `export NNN_USE_EDITOR=1`.
2019-12-09 00:34:53 +05:30
4. For additional functionality [install plugins](https://github.com/jarun/nnn/tree/master/plugins#installing-plugins).
2019-12-13 19:22:19 +05:30
5. To copy selected file paths to system clipboard and show notis on cp, mv, rm completion use option `-x`.
6. For a strictly CLI-only experience, see plugin `nuke`. It's a sample opener you can customize.
2019-09-26 05:46:06 +05:30
2019-12-14 21:29:52 +05:30
Don't memorize keys. Arrows (or <kbd>h</kbd> <kbd>j</kbd> <kbd>k</kbd> <kbd>l</kbd>), <kbd>/</kbd> and <kbd>q</kbd> suffice. Press <kbd>?</kbd> to list shortcuts anytime.
2019-09-26 05:46:06 +05:30
2019-08-09 10:28:14 +05:30
## Installation
2017-03-29 11:03:22 +05:30
2019-02-10 08:45:13 +05:30
#### Library dependencies
2017-08-14 05:43:01 +05:30
2019-12-13 19:22:19 +05:30
A curses library with wide char support (e.g. ncursesw), libreadline (optional) and standard libc.
2016-08-20 21:57:14 +05:30
2019-02-10 08:45:13 +05:30
#### Utility dependencies
2019-06-14 08:52:17 +05:30
| Dependency | Installation | Operation |
| --- | --- | --- |
| xdg-open (Linux), open(1) (macOS), cygstart (Cygwin) | base | desktop opener |
2019-11-21 20:30:38 +05:30
| file, coreutils (cp, mv, rm), xargs | base | file type, copy, move and remove |
2019-07-27 16:44:03 +05:30
| tar, (un)zip [atool/bsdtar for more formats] | base | create, list, extract tar, gzip, bzip2, zip |
2019-10-12 09:48:58 +05:30
| archivemount, fusermount(3) | optional | mount, unmount archives |
2019-11-24 21:22:44 +05:30
| sshfs, [rclone](https://rclone.org/), fusermount(3) | optional | mount, unmount remotes |
2019-11-06 16:26:49 +05:30
| 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)) |
2019-08-24 11:29:29 +05:30
| advcpmv (Linux) ([integration](https://github.com/jarun/nnn/wiki/Advanced-use-cases#show-cp-mv-progress)) | optional | copy, move progress |
2019-06-14 08:52:17 +05:30
| `$VISUAL` (else `$EDITOR`), `$PAGER`, `$SHELL` | optional | fallback vi, less, sh |
2019-02-10 08:45:13 +05:30
2017-08-14 05:43:01 +05:30
#### From a package manager
2016-08-20 21:57:14 +05:30
2019-09-27 19:03:19 +05:30
Install `nnn` from your package manager. If the version available is dated try an alternative installation method.
2019-07-31 23:31:37 +05:30
2019-09-29 09:48:51 +05:30
<details><summary>Packaging status (expand)</summary>
2019-09-26 18:58:29 +05:30
<p>
<br>
<a href="https://repology.org/metapackage/nnn/versions"><img src="https://repology.org/badge/vertical-allrepos/nnn.svg" alt="Packaging status"></a>
</p>
Unlisted distros:
2019-08-20 08:47:48 +05:30
<p>
<br>
● CentOS (<code>yum --enablerepo=epel install nnn</code>)<br>
<a href="https://notabug.org/milislinux/milis/src/master/talimatname/genel/n/nnn/talimat">Milis Linux</a> (<code>mps kur nnn</code>)<br>
<a href="https://www.nutyx.org/en/?type=pkg&branch=rolling&arch=x86_64&searchpkg=nnn">NuTyX</a> (<code>cards install nnn</code>)<br>
<a href="http://codex.sourcemage.org/test/shell-term-fm/nnn/">Source Mage</a> (<code>cast nnn</code>)<br>
</p>
</details>
2019-01-11 12:01:33 +03:00
2017-08-13 20:20:37 +05:30
#### Release packages
2019-09-27 19:03:19 +05:30
Packages for Arch Linux, CentOS, Debian, Fedora and Ubuntu are auto-generated with the [latest stable release](https://github.com/jarun/nnn/releases/latest).
2017-08-13 20:20:37 +05:30
2017-08-14 05:43:01 +05:30
#### From source
Download the latest stable release or clone this repository (*risky*), install deps and compile. On Ubuntu 18.04:
2017-08-14 05:43:01 +05:30
$ sudo apt-get install pkg-config libncursesw5-dev libreadline-dev
2019-06-19 22:03:08 +05:30
$ sudo make strip install
2017-08-14 05:43:01 +05:30
2019-12-13 19:22:19 +05:30
To compile _without_ libreadline:
$ sudo apt-get install pkg-config libncursesw5-dev
$ sudo make O_NORL=1 strip install
2017-08-14 05:43:01 +05:30
`PREFIX` is supported, in case you want to install to a different location.
2019-12-14 19:00:09 +05:30
See the [developer guides](https://github.com/jarun/nnn/wiki/Developer-guides) for compilation notes on the Pi, Cygwin and other compilation modes.
2018-12-01 21:45:45 +05:30
2018-11-13 09:21:21 +05:30
#### Shell completion
2017-09-02 12:23:19 +05:30
2019-09-27 19:03:19 +05:30
Completion scripts for Bash, Fish and Zsh are [available](misc/auto-completion). Refer to your shell's manual for installation instructions.
2017-09-02 12:23:19 +05:30
2019-10-06 19:52:30 +05:30
## Elsewhere
2017-04-25 22:24:47 +05:30
2019-10-06 19:52:30 +05:30
- [Wikipedia](https://en.wikipedia.org/wiki/Nnn_(file_manager))
- [ArchWiki](https://wiki.archlinux.org/index.php/Nnn)
2017-04-25 22:24:47 +05:30
- [FOSSMint](https://www.fossmint.com/nnn-linux-terminal-file-browser/)
2019-11-12 03:01:53 +05:30
- [gHacks Tech News](https://www.ghacks.net/2019/11/01/nnn-is-an-excellent-command-line-based-file-manager-for-linux-macos-and-bsds/)
2019-09-29 09:48:51 +05:30
- Hacker News [[1](https://news.ycombinator.com/item?id=18520898)] [[2](https://news.ycombinator.com/item?id=19850656)]
2018-08-18 12:34:25 +05:30
- [It's FOSS](https://itsfoss.com/nnn-file-browser-linux/)
2019-09-29 09:48:51 +05:30
- LinuxLinks [[1](https://www.linuxlinks.com/nnn-fast-and-flexible-file-manager/)] [[2](https://www.linuxlinks.com/bestconsolefilemanagers/)]
2019-01-01 22:31:21 -08:00
- [Suckless Rocks](https://suckless.org/rocks/)
2018-08-18 12:34:25 +05:30
- [Ubuntu Full Circle Magazine - Issue 135](https://fullcirclemagazine.org/issue-135/)
2017-04-25 22:24:47 +05:30
2019-08-09 10:28:14 +05:30
## Developers
2017-04-15 06:51:10 +05:30
2019-10-19 05:14:18 +05:30
- [Arun Prakash Jana](https://github.com/jarun) (Copyright © 2016-2019)
- [0xACE](https://github.com/0xACE)
2019-12-20 00:35:58 +05:30
- [Anna Arad](https://github.com/annagrram)
2019-10-19 05:14:18 +05:30
- [KlzXS](https://github.com/KlzXS)
2019-12-20 00:35:58 +05:30
- [Maxim Baz](https://github.com/maximbaz)
2019-10-19 05:14:18 +05:30
- and other contributors
2019-01-18 07:38:56 +05:30
2019-11-23 10:29:21 +05:30
`nnn` is actively developed. Visit the to the [ToDo list](https://github.com/jarun/nnn/issues/386) to contribute or see the features in progress.