Ver código fonte

Add examples of useful commands to run as plugin

master
Arun Prakash Jana 5 anos atrás
pai
commit
f92658f31e
Nenhuma chave conhecida encontrada para esta assinatura no banco de dados ID da chave GPG: A75979F35C080412
2 arquivos alterados com 23 adições e 0 exclusões
  1. +12
    -0
      nnn.1
  2. +11
    -0
      plugins/README.md

+ 12
- 0
nnn.1 Ver arquivo

@@ -214,6 +214,18 @@ when dealing with the !, e and p commands respectively. A single combination to
5. To skip user confirmation after command execution, suffix with \fB*\fR 5. To skip user confirmation after command execution, suffix with \fB*\fR


export NNN_PLUG='y:-_sync*' export NNN_PLUG='y:-_sync*'

EXAMPLES:
----------------------------------- + -------------------------------------------------
Key:Command | Description
----------------------------------- + -------------------------------------------------
k:-_fuser -kiv $nnn* | Interactively kill process(es) using hovered file
l:_git log | Show git log
n:-_vi /home/user/Dropbox/dir/note* | Take quick notes in a synced file/dir of notes
s:_smplayer -minigui $nnn* | Play hovered media file, even unfinished download
x:_chmod +x $nnn | Make the hovered file executable
y:-_sync* | Flush cached writes
----------------------------------- + -------------------------------------------------
.Ed .Ed
.Pp .Pp
\fBNNN_USE_EDITOR:\fR use VISUAL (else EDITOR, preferably CLI, fallback vi) to handle text files. \fBNNN_USE_EDITOR:\fR use VISUAL (else EDITOR, preferably CLI, fallback vi) to handle text files.


+ 11
- 0
plugins/README.md Ver arquivo

@@ -106,6 +106,17 @@ Notes:
3. (_Again_) add `_` before the command 3. (_Again_) add `_` before the command
4. To disable directory refresh after running a _command as plugin_, prefix the command with `-_` 4. To disable directory refresh after running a _command as plugin_, prefix the command with `-_`


#### Some useful key-command examples

| Key:Command | Description |
|---|---|
| `k:-_fuser -kiv $nnn*` | Interactively kill process(es) using hovered file |
| `l:_git log` | Show git log |
| `n:-_vi /home/user/Dropbox/dir/note*` | Take quick notes in a synced file/dir of notes |
| `s:_smplayer -minigui $nnn*` | Play hovered media file, even unfinished download |
| `x:_chmod +x $nnn` | Make the hovered file executable |
| `y:-_sync*` | Flush cached writes |

## Access level of plugins ## Access level of plugins


When `nnn` executes a plugin, it does the following: When `nnn` executes a plugin, it does the following:


||||||
x
 
000:0
Carregando…
Cancelar
Salvar