mirror of
https://github.com/jarun/nnn.git
synced 2024-11-24 11:51:27 +00:00
Update examples
This commit is contained in:
parent
6d2d901a91
commit
46b48cf71c
|
@ -246,6 +246,7 @@ There are many plugins provided by `nnn` which can be used as examples. Here are
|
||||||
|
|
||||||
```sh
|
```sh
|
||||||
#!/usr/bin/env sh
|
#!/usr/bin/env sh
|
||||||
|
|
||||||
git log -p -- "$1"
|
git log -p -- "$1"
|
||||||
```
|
```
|
||||||
|
|
||||||
|
@ -253,6 +254,7 @@ git log -p -- "$1"
|
||||||
|
|
||||||
```sh
|
```sh
|
||||||
#!/usr/bin/env sh
|
#!/usr/bin/env sh
|
||||||
|
|
||||||
. $(dirname $0)/.nnn-plugin-helper
|
. $(dirname $0)/.nnn-plugin-helper
|
||||||
|
|
||||||
nnn_cd "$(xsel -ob)"
|
nnn_cd "$(xsel -ob)"
|
||||||
|
@ -262,6 +264,7 @@ nnn_cd "$(xsel -ob)"
|
||||||
|
|
||||||
```sh
|
```sh
|
||||||
#!/usr/bin/env sh
|
#!/usr/bin/env sh
|
||||||
|
|
||||||
. $(dirname $0)/.nnn-plugin-helper
|
. $(dirname $0)/.nnn-plugin-helper
|
||||||
|
|
||||||
nnn_cd "$(dirname $(readlink -fn $1))" 0
|
nnn_cd "$(dirname $(readlink -fn $1))" 0
|
||||||
|
@ -271,6 +274,7 @@ nnn_cd "$(dirname $(readlink -fn $1))" 0
|
||||||
|
|
||||||
```sh
|
```sh
|
||||||
#!/usr/bin/env sh
|
#!/usr/bin/env sh
|
||||||
|
|
||||||
printf "cd to: "
|
printf "cd to: "
|
||||||
read -r dir
|
read -r dir
|
||||||
|
|
||||||
|
@ -281,6 +285,7 @@ printf "%s" "0c$dir" > "$NNN_PIPE"
|
||||||
|
|
||||||
```sh
|
```sh
|
||||||
#!/usr/bin/env sh
|
#!/usr/bin/env sh
|
||||||
|
|
||||||
if [ -z "$NNN_FIFO" ] ; then
|
if [ -z "$NNN_FIFO" ] ; then
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
|
|
Loading…
Reference in a new issue