mirror of
https://github.com/jarun/nnn.git
synced 2024-11-24 11:51:27 +00:00
PR #399: add autojump plugin
This commit is contained in:
parent
92bba0cbf8
commit
ef09f42720
|
@ -14,6 +14,7 @@ Plugins extend the capabilities of `nnn`. They are _executable_ scripts (or bina
|
||||||
|
|
||||||
| Plugin (a-z) | Description | Lang | Deps |
|
| Plugin (a-z) | Description | Lang | Deps |
|
||||||
| --- | --- | --- | --- |
|
| --- | --- | --- | --- |
|
||||||
|
| autojump | Navigate to dir/path | sh | autojump |
|
||||||
| boom | Play random music from dir | sh | [moc](http://moc.daper.net/) |
|
| boom | Play random music from dir | sh | [moc](http://moc.daper.net/) |
|
||||||
| dups | List non-empty duplicate files in current dir | sh | find, md5sum,<br>sort uniq xargs |
|
| dups | List non-empty duplicate files in current dir | sh | find, md5sum,<br>sort uniq xargs |
|
||||||
| chksum | Create and verify checksums | sh | md5sum,<br>sha256sum |
|
| chksum | Create and verify checksums | sh | md5sum,<br>sha256sum |
|
||||||
|
|
17
plugins/autojump
Executable file
17
plugins/autojump
Executable file
|
@ -0,0 +1,17 @@
|
||||||
|
#!/usr/bin/env sh
|
||||||
|
|
||||||
|
# Description: Navigate to directory using autojump
|
||||||
|
#
|
||||||
|
# Requires: autojump - https://github.com/wting/autojump
|
||||||
|
#
|
||||||
|
# Shell: POSIX compliant
|
||||||
|
# Author: Marty Buchaus
|
||||||
|
|
||||||
|
if which autojump >/dev/null 2>&1; then
|
||||||
|
printf "jump to: "
|
||||||
|
read -r dir
|
||||||
|
odir="$(autojump "$dir")"
|
||||||
|
printf "%s" "0$odir" > "$NNN_PIPE"
|
||||||
|
else
|
||||||
|
exit 1
|
||||||
|
fi
|
Loading…
Reference in a new issue