Procházet zdrojové kódy

Update docs

master
Arun Prakash Jana před 4 roky
rodič
revize
6a4ff8b825
V databázi nebyl nalezen žádný známý klíč pro tento podpis ID GPG klíče: A75979F35C080412
3 změnil soubory, kde provedl 23 přidání a 16 odebrání
  1. +4
    -2
      README.md
  2. +3
    -0
      nnn.1
  3. +16
    -14
      plugins/README.md

+ 4
- 2
README.md Zobrazit soubor

@@ -101,8 +101,10 @@ It runs smoothly on the Pi, [Termux](https://www.youtube.com/watch?v=AbaauM7gUJw
- By name, access/change/mod (default) time, size, extn - By name, access/change/mod (default) time, size, extn
- Reverse sort - Reverse sort
- Mimes - Mimes
- Open with desktop opener or specify a custom opener
- Preview hovered files in FIFO-based previewer - 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 (can be compiled-in using relevant make option)
- Plugins for image and video thumbnails - Plugins for image and video thumbnails
- Create, list, extract, mount (FUSE based) archives - Create, list, extract, mount (FUSE based) archives
- Option to open all text files in EDITOR - Option to open all text files in EDITOR
@@ -129,7 +131,7 @@ It runs smoothly on the Pi, [Termux](https://www.youtube.com/watch?v=AbaauM7gUJw
1. [Install](https://github.com/jarun/nnn/wiki/Usage#installation) `nnn` and deps (if you need any). All files are opened with the desktop opener by default. 1. [Install](https://github.com/jarun/nnn/wiki/Usage#installation) `nnn` and deps (if you need any). All files are opened with the desktop opener by default.
2. Add option `-e` to your alias to open text files in `$VISUAL`/`$EDITOR`/ vi. [Open detached](https://github.com/jarun/nnn/wiki/Basic-use-cases#detached-text) if you wish. 2. Add option `-e` to your alias to open text files in `$VISUAL`/`$EDITOR`/ vi. [Open detached](https://github.com/jarun/nnn/wiki/Basic-use-cases#detached-text) if you wish.
3. Configure [cd on quit](https://github.com/jarun/nnn/wiki/Basic-use-cases#configure-cd-on-quit). 3. Configure [cd on quit](https://github.com/jarun/nnn/wiki/Basic-use-cases#configure-cd-on-quit).
4. [Install plugins](https://github.com/jarun/nnn/tree/master/plugins#installing-plugins). 4. [Install plugins](https://github.com/jarun/nnn/tree/master/plugins#installation).
5. Use option `-x` to copy selected file paths to system clipboard and show notis on cp, mv, rm completion. 5. Use option `-x` to copy selected file paths to system clipboard and show notis on cp, mv, rm completion.
6. For a CLI-only environment, customize and use plugin [`nuke`](https://github.com/jarun/nnn/blob/master/plugins/nuke) with option `-c` (overrides `-e`). 6. For a CLI-only environment, customize and use plugin [`nuke`](https://github.com/jarun/nnn/blob/master/plugins/nuke) with option `-c` (overrides `-e`).




+ 3
- 0
nnn.1 Zobrazit soubor

@@ -380,6 +380,9 @@ separated by \fI;\fR:
.Bd -literal .Bd -literal
export NNN_PLUG='x:_chmod +x $nnn;g:_git log;s:_smplayer $nnn' export NNN_PLUG='x:_chmod +x $nnn;g:_git log;s:_smplayer $nnn'


To pick and run an unassigned plugin, press \fBEnter\fR at the plugin prompt.
To run a plugin at startup, use the option `-P` followed by the plugin key.

NOTES: NOTES:
1. Use single quotes for $NNN_PLUG so $nnn is not interpreted 1. Use single quotes for $NNN_PLUG so $nnn is not interpreted
2. $nnn should be the last argument (IF used) 2. $nnn should be the last argument (IF used)


+ 16
- 14
plugins/README.md Zobrazit soubor

@@ -12,16 +12,6 @@ Plugins extend the capabilities of `nnn`. They are _executable_ scripts (or bina


`nnn` is _**language-agnostic**_ when it comes to plugins. You can write a plugin in any (scripting) language you are comfortable in! `nnn` is _**language-agnostic**_ when it comes to plugins. You can write a plugin in any (scripting) language you are comfortable in!


## Installing plugins

The following command installs or updates (after backup) all plugins:

```sh
curl -Ls https://raw.githubusercontent.com/jarun/nnn/master/plugins/getplugs | sh
```

Plugins are installed to `${XDG_CONFIG_HOME:-$HOME/.config}/nnn/plugins`.

## List of plugins ## List of plugins


| Plugin (a-z) | Description | Lang | Dependencies | | Plugin (a-z) | Description | Lang | Dependencies |
@@ -78,19 +68,31 @@ Plugins are installed to `${XDG_CONFIG_HOME:-$HOME/.config}/nnn/plugins`.
| [wall](wall) | Set wallpaper or change colorscheme | sh | nitrogen/pywal | | [wall](wall) | Set wallpaper or change colorscheme | sh | nitrogen/pywal |
| [x2sel](x2sel) | Copy `\n`-separated file list from system clipboard to sel | sh | _see in-file docs_ | | [x2sel](x2sel) | Copy `\n`-separated file list from system clipboard to sel | sh | _see in-file docs_ |


## Invoking a plugin ## Installation


Press the plugin shortcut (<kbd>;</kbd>) followed by the assigned key character. E.g., with the below config: The following command installs or updates (after backup) all plugins:

```sh
curl -Ls https://raw.githubusercontent.com/jarun/nnn/master/plugins/getplugs | sh
```

Plugins are installed to `${XDG_CONFIG_HOME:-$HOME/.config}/nnn/plugins`.

## Configuration

Set environment variable `NNN_PLUG` to assign keybinds and invoke plugins directly using the plugin shortcut (<kbd>;</kbd>) followed by the assigned key character. E.g., with the below config:


```sh ```sh
export NNN_PLUG='f:finder;o:fzopen;p:mocplay;d:diffs;t:nmount;v:imgview' export NNN_PLUG='f:finder;o:fzopen;p:mocplay;d:diffs;t:nmount;v:imgview'
``` ```


Plugin `finder` can be run with the keybind <kbd>;f</kbd>, `fzopen` can be run with <kbd>;o</kbd> and so on... The key vs. plugin pairs are shown in the help and config screen. plugin `finder` can be invoked with the keybind <kbd>;f</kbd>, `fzopen` can be run with <kbd>;o</kbd> and so on... The key vs. plugin pairs are shown in the help and config screen.


Alternatively, combine with <kbd>Alt</kbd> (i.e. <kbd>Alt+key</kbd>). Alternatively, combine with <kbd>Alt</kbd> (i.e. <kbd>Alt+key</kbd>).


To select and invoke a plugin from the plugin directory, press <kbd>Enter</kbd> (to _enter_ the plugin dir) after the plugin shortcut. To pick and run an unassigned plugin, press <kbd>Enter</kbd> (to _enter_ the plugin dir) at the plugin prompt.

To run a plugin at startup, use the option `-P` followed by the plugin key.


#### Skip directory refresh after running a plugin #### Skip directory refresh after running a plugin




||||||
x
 
000:0
Načítá se…
Zrušit
Uložit