My build of nnn with minor changes
Du kannst nicht mehr als 25 Themen auswählen Themen müssen entweder mit einem Buchstaben oder einer Ziffer beginnen. Sie können Bindestriche („-“) enthalten und bis zu 35 Zeichen lang sein.

vor 8 Jahren
vor 8 Jahren
vor 7 Jahren
vor 8 Jahren
vor 7 Jahren
vor 7 Jahren
vor 7 Jahren
vor 7 Jahren
vor 8 Jahren
vor 7 Jahren
vor 7 Jahren
vor 7 Jahren
vor 7 Jahren
vor 7 Jahren
vor 7 Jahren
vor 8 Jahren
vor 8 Jahren
vor 8 Jahren
vor 8 Jahren
vor 7 Jahren
vor 8 Jahren
vor 8 Jahren
vor 8 Jahren
vor 7 Jahren
vor 8 Jahren
vor 7 Jahren
vor 7 Jahren
vor 7 Jahren
vor 7 Jahren
vor 7 Jahren
vor 8 Jahren
vor 8 Jahren
vor 7 Jahren
vor 8 Jahren
vor 7 Jahren
vor 8 Jahren
vor 7 Jahren
vor 7 Jahren
vor 7 Jahren
vor 7 Jahren
vor 7 Jahren
vor 7 Jahren
vor 7 Jahren
vor 7 Jahren
vor 7 Jahren
vor 7 Jahren
123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179
  1. ## nnn
  2. Noice is Not Noice, a noicer fork...
  3. ### Table of Contents
  4. - [Introduction](#introduction)
  5. - [Why fork?](#why-fork)
  6. - [Original features](#original-features)
  7. - [nnn toppings](#nnn-toppings)
  8. - [Installation](#installation)
  9. - [Usage](#usage)
  10. - [Keyboard shortcuts](#keyboard-shortcuts)
  11. - [Filters](#filters)
  12. - [File type abbreviations](#file-type-abbreviations)
  13. - [Help](#help)
  14. - [Copy current file path to clipboard](#copy-current-file-path-to-clipboard)
  15. - [Change file associations](#change-file-associations)
  16. ### Introduction
  17. nnn is a fork of [noice](http://git.2f30.org/noice/), a blazing-fast terminal file browser with easy keyboard shortcuts for navigation, opening files and running tasks. It is developed with terminal based systems in mind. However, the incredible user-friendliness and speed make it a perfect utility on modern distros.
  18. The only issue with noice is hard-coded file associations. There is no config file (better performance and simpler to maintain) and one has to modify the source to change associations (see [how to change file associations](#change-file-associations)). nnn solves the problem by adding the flexibility of using the default desktop opener at runtime. There are several other improvements too (see [fork-toppings](#fork-toppings)).
  19. Have fun with it! PRs are welcome. Check out [#1](https://github.com/jarun/nnn/issues/1).
  20. ### Why fork?
  21. I chose to fork because:
  22. - one can argue my approach deviates from the goal of the original project - keep the utility `suckless`. In my opinion evolution is the taste of time.
  23. - I would like to have a bit of control on what features are added in the name of desktop integration. A feature-bloat is the last thing in my mind.
  24. ### Original features
  25. - Super-easy navigation
  26. - Open files with default-associated programs
  27. - Jump to home directory
  28. - Filter contents in current directory
  29. - Show/hide hidden files
  30. - Sort entries by modification time (newest to oldest)
  31. - Spawn a `SHELL` in current directory (fallback sh)
  32. - Run `top`
  33. - Edit a file with `EDITOR` (fallback vi)
  34. - Page through a file in `PAGER` (fallback less)
  35. ### nnn toppings
  36. - Behaviour and navigation
  37. - Detail view (default: disabled) with:
  38. - file type
  39. - modification time
  40. - human-readable file size
  41. - current item in reverse video
  42. - number of items in current directory
  43. - full name of currently selected file
  44. - Directories first
  45. - Sort numeric names in numeric order
  46. - Case-insensitive alphabetic content listing instead of upper case first
  47. - Roll over at the first and last entries of a directory (with Up/Down keys)
  48. - Removed navigation restriction with relative paths (and let permissions handle it)
  49. - Sort entries by file size (largest to smallest)
  50. - Shortcut to invoke file name copier (set using environment variable `NNN_COPIER`)
  51. - File associations
  52. - Environment variable `NNN_OPENER` to let desktop opener handle it all. E.g.:
  53. export NNN_OPENER=xdg-open
  54. export NNN_OPENER=gnome-open
  55. export NNN_OPENER=gvfs-open
  56. - Selective file associations (ignored if `NNN_OPENER` is set):
  57. - Associate plain text files with vi (using `file` command)
  58. - Remove video file associations (to each his own favourite video player)
  59. - Associate common audio mimes with mpv
  60. - Associate PDF files with [zathura](https://pwmt.org/projects/zathura/)
  61. - Use environment variable `NNN_FALLBACK_OPENER` to open other non-associated files
  62. - Removed `less` as default file opener (there is no universal standalone opener utility)
  63. - Optimizations
  64. - Efficient memory usage, 0 malloc()
  65. - Complete redundant buffer removal
  66. - All frequently used local chunks now static
  67. - Removed some redundant string allocation and manipulation
  68. - Simplified some roundabout procedures
  69. - `-O3` level optimization, warning fixes
  70. - Added compilation flag `-march=native`
  71. - Massive binary size optimization
  72. - Remove generated config.h on `make clean`
  73. - strip the final binary
  74. ### Installation
  75. nnn needs a curses implementation and standard libc.
  76. Download the [latest master](https://github.com/jarun/nnn/archive/master.zip) or clone this repository. Compile and install:
  77. $ make
  78. $ sudo make install
  79. No plans of packaging at the time.
  80. ### Usage
  81. Start nnn (default: current directory):
  82. $ nnn [-d] [path_to_dir]
  83. -d: open in detail view mode
  84. `>` indicates the currently selected entry in nnn.
  85. ### Keyboard shortcuts
  86. | Key | Function |
  87. | --- | --- |
  88. | `Up`, `k`, `^P` | previous entry |
  89. | `Down`, `j`, `^N` | next entry |
  90. | `PgUp`, `^U` | scroll half page up |
  91. | `PgDn`, `^D` | scroll half page down |
  92. | `Home`, `^`, `^A` | jump to first dir entry |
  93. | `End`, `$`, `^E` | jump to last dir entry |
  94. | `Right`, `Enter`, `l`, `^M` | open file or enter dir |
  95. | `Left`, `Backspace`, `h`, `^H` | parent dir |
  96. | `~` | jump to home dir |
  97. | `/`, `&` | filter dir contents |
  98. | `c` | show change dir prompt |
  99. | `d` | toggle detail view |
  100. | `.` | toggle hide dot files |
  101. | `s` | toggle sort by file size |
  102. | `t` | toggle sort by modified time |
  103. | `!` | spawn `SHELL` in `PWD` (fallback sh) |
  104. | `z` | run `top` |
  105. | `e` | edit entry in `EDITOR` (fallback vi) |
  106. | `p` | open entry with `PAGER` (fallback less) |
  107. | `^K` | invoke file name copier |
  108. | `^L` | redraw window |
  109. | `q` | quit |
  110. ### Filters
  111. Filters support regexes to display only the matched entries in the current directory view. This effectively allows searching through the directory tree for a particular entry.
  112. Filters do not stack on top of each other. They are applied anew every time. An empty filter expression resets the filter.
  113. If nnn is invoked as root the default filter will also match hidden files.
  114. ### File type abbreviations
  115. The following abbreviations are used in the detail view:
  116. | Symbol | File Type |
  117. | --- | --- |
  118. | `/` | Directory |
  119. | `*` | Executable |
  120. | `|` | Fifo |
  121. | `=` | Socket |
  122. | `@` | Symbolic Link |
  123. | `b` | Block Device |
  124. | `c` | Character Device |
  125. ### Help
  126. $ man nnn
  127. ### Copy current file path to clipboard
  128. nnn can pipe the absolute path of the current file to a copier script. For example, you can use `xsel` on Linux or `pbcopy` on OS X.
  129. Sample Linux copier script:
  130. #!/bin/sh
  131. echo -n $1 | xsel --clipboard --input
  132. export `NNN_OPENER`:
  133. export NNN_COPIER="/home/vaio/copier.sh"
  134. Start nnn and use `Ctrl-k` to copy the absolute path (from `/`) of the file under the cursor to clipboard.
  135. ### Change file associations
  136. If you want to set custom applications for certain mime types, or change the ones set already (e.g. vi, mpv, zathura), modify the `assocs` structure in [config.def.h](https://github.com/jarun/nnn/blob/master/config.def.h) (it's easy). Then re-compile and install.