mirror of
https://github.com/jarun/nnn.git
synced 2024-11-24 20:01:27 +00:00
Fix alignment
This commit is contained in:
parent
f24b82a750
commit
3b6938f782
|
@ -230,16 +230,19 @@ Don't forget to fork in the background to avoid blocking `nnn`.
|
||||||
|
|
||||||
For more details on configuration and usage of the preview plugins, visit [Live Previews](https://github.com/jarun/nnn/wiki/Live-previews).
|
For more details on configuration and usage of the preview plugins, visit [Live Previews](https://github.com/jarun/nnn/wiki/Live-previews).
|
||||||
|
|
||||||
#### Examples
|
## Examples
|
||||||
|
|
||||||
There are many plugins provided by `nnn` which can be used as examples. Here are a few simple selected examples.
|
There are many plugins provided by `nnn` which can be used as examples. Here are a few simple selected examples.
|
||||||
|
|
||||||
- Show the git log of changes to the particular file along with the code for a quick and easy review.
|
#### Show the git log of changes to the particular file along with the code for a quick and easy review.
|
||||||
|
|
||||||
```sh
|
```sh
|
||||||
#!/usr/bin/env sh
|
#!/usr/bin/env sh
|
||||||
git log -p -- "$1"
|
git log -p -- "$1"
|
||||||
```
|
```
|
||||||
|
|
||||||
- Change to directory in clipboard using helper script
|
#### Change to directory in clipboard using helper script
|
||||||
|
|
||||||
```sh
|
```sh
|
||||||
#!/usr/bin/env sh
|
#!/usr/bin/env sh
|
||||||
. $(dirname $0)/.nnn-plugin-helper
|
. $(dirname $0)/.nnn-plugin-helper
|
||||||
|
@ -247,7 +250,8 @@ There are many plugins provided by `nnn` which can be used as examples. Here are
|
||||||
nnn_cd "$(xsel -ob)"
|
nnn_cd "$(xsel -ob)"
|
||||||
```
|
```
|
||||||
|
|
||||||
- Change directory to the location of a link using helper script with specific context (current)
|
#### Change directory to the location of a link using helper script with specific context (current)
|
||||||
|
|
||||||
```sh
|
```sh
|
||||||
#!/usr/bin/env sh
|
#!/usr/bin/env sh
|
||||||
. $(dirname $0)/.nnn-plugin-helper
|
. $(dirname $0)/.nnn-plugin-helper
|
||||||
|
@ -255,7 +259,8 @@ There are many plugins provided by `nnn` which can be used as examples. Here are
|
||||||
nnn_cd "$(dirname $(readlink -fn $1))" 0
|
nnn_cd "$(dirname $(readlink -fn $1))" 0
|
||||||
```
|
```
|
||||||
|
|
||||||
- Change to arbitrary directory without helper script
|
#### Change to arbitrary directory without helper script
|
||||||
|
|
||||||
```sh
|
```sh
|
||||||
#!/usr/bin/env sh
|
#!/usr/bin/env sh
|
||||||
printf "cd to: "
|
printf "cd to: "
|
||||||
|
@ -264,7 +269,8 @@ There are many plugins provided by `nnn` which can be used as examples. Here are
|
||||||
printf "%s" "0c$dir" > "$NNN_PIPE"
|
printf "%s" "0c$dir" > "$NNN_PIPE"
|
||||||
```
|
```
|
||||||
|
|
||||||
- Send every hovered file to X selection
|
#### Send every hovered file to X selection
|
||||||
|
|
||||||
```sh
|
```sh
|
||||||
#!/usr/bin/env sh
|
#!/usr/bin/env sh
|
||||||
if [ -z "$NNN_FIFO" ] ; then
|
if [ -z "$NNN_FIFO" ] ; then
|
||||||
|
@ -277,7 +283,8 @@ There are many plugins provided by `nnn` which can be used as examples. Here are
|
||||||
disown
|
disown
|
||||||
```
|
```
|
||||||
|
|
||||||
- Quick find (using `fd`)
|
#### Quick find (using `fd`)
|
||||||
|
|
||||||
```sh
|
```sh
|
||||||
#!/usr/bin/env sh
|
#!/usr/bin/env sh
|
||||||
|
|
||||||
|
@ -292,7 +299,8 @@ There are many plugins provided by `nnn` which can be used as examples. Here are
|
||||||
fi
|
fi
|
||||||
```
|
```
|
||||||
|
|
||||||
- Quick grep (using `rg`)
|
#### Quick grep (using `rg`)
|
||||||
|
|
||||||
```sh
|
```sh
|
||||||
#!/usr/bin/env sh
|
#!/usr/bin/env sh
|
||||||
|
|
||||||
|
@ -306,7 +314,9 @@ There are many plugins provided by `nnn` which can be used as examples. Here are
|
||||||
eval "rg -l0 --hidden -S $pattern" > "$NNN_PIPE"
|
eval "rg -l0 --hidden -S $pattern" > "$NNN_PIPE"
|
||||||
fi
|
fi
|
||||||
```
|
```
|
||||||
- Quick scripts for paged output
|
|
||||||
|
#### Quick scripts for paged output
|
||||||
|
|
||||||
```sh
|
```sh
|
||||||
#!/usr/bin/env sh
|
#!/usr/bin/env sh
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue