mirror of
https://github.com/jarun/nnn.git
synced 2024-11-27 21:31:30 +00:00
Add command to download plugins
This commit is contained in:
parent
65c986b70a
commit
2c3b5e2f78
|
@ -53,7 +53,7 @@ It runs smoothly on the Raspberry Pi, Termux on Android, Linux, macOS, BSD, Cygw
|
|||
|
||||
- [Wiki](https://github.com/jarun/nnn/wiki): operational concepts, how tos, use cases, chronology and insights
|
||||
- [Performance numbers](https://github.com/jarun/nnn/wiki/Performance)
|
||||
- [Plugin repository](https://github.com/jarun/nnn/tree/master/plugins)
|
||||
- [Plugin repository and docs](https://github.com/jarun/nnn/tree/master/plugins)
|
||||
- [(neo)vim plugin](https://github.com/mcchrish/nnn.vim)
|
||||
- [`nnn` on Android](https://www.youtube.com/watch?v=AbaauM7gUJw)
|
||||
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
To extend the capabilities of `nnn`, plugins are introduced. Plugins are scripts which `nnn` can communicate with and trigger. This mechanism fits perfectly with the fundamental design to keep the core file manager lean and fast, by delegating repetitive (but not necessarily file manager-specific) tasks to the plugins.
|
||||
Plugins extend the capabilities of `nnn`. They are scripts which `nnn` can communicate with and trigger. This mechanism fits perfectly with the fundamental design to keep the core file manager lean and fast, by delegating repetitive (but not necessarily file manager-specific) tasks to the plugins.
|
||||
|
||||
The currently available plugins are listed below.
|
||||
|
||||
|
@ -8,7 +8,7 @@ The currently available plugins are listed below.
|
|||
| dups | sh | find, md5sum,<br>sort uniq xargs | List non-empty duplicate files in current dir |
|
||||
| checksum | sh | md5sum,<br>sha256sum | Create and verify checksums |
|
||||
| fzy-open | sh | fzy, xdg-open | Fuzzy find a file in dir subtree and edit or xdg-open |
|
||||
| getplugs | sh | wget | Update plugins |
|
||||
| getplugs | sh | curl | Update plugins |
|
||||
| hexview | sh | xxd | View a file in hex in `$PAGER` |
|
||||
| imgresize | sh | [imgp](https://github.com/jarun/imgp) | Resize images in dir to screen resolution |
|
||||
| imgur | bash | - | Upload an image to imgur (from [imgur-screenshot](https://github.com/jomo/imgur-screenshot)) |
|
||||
|
@ -33,13 +33,17 @@ The currently available plugins are listed below.
|
|||
| sxiv | sh | sxiv | View images in dir, set wallpaper, copy path ([config](https://wiki.archlinux.org/index.php/Sxiv#Assigning_keyboard_shortcuts))|
|
||||
| thumb | sh | [lsix](https://github.com/hackerb9/lsix) | View thumbnail of an image or dir of images |
|
||||
| transfer | sh | curl | Upload file to transfer.sh |
|
||||
| upgrade | sh | wget | Upgrade nnn manually on Debian 9 Stretch |
|
||||
| upgrade | sh | curl | Upgrade nnn manually on Debian 9 Stretch |
|
||||
| vidthumb | sh | [ffmpegthumbnailer](https://github.com/dirkvdb/ffmpegthumbnailer),<br>[lsix](https://github.com/hackerb9/lsix) | Show video thumbnails in terminal |
|
||||
| viuimg | sh | [viu](https://github.com/atanunq/viu), less | View an image or images in dir |
|
||||
|
||||
## Installing plugins
|
||||
|
||||
Download the `getplugs` plugin and execute it anywhere to get all the plugins installed to `${XDG_CONFIG_HOME:-$HOME/.config}/nnn/plugins`. You can run it again later to update the plugins. It backs up earlier plugins.
|
||||
The following command installs all plugins:
|
||||
|
||||
curl -Ls https://raw.githubusercontent.com/jarun/nnn/master/plugins/getplugs | sh
|
||||
|
||||
Plugins are installed to `${XDG_CONFIG_HOME:-$HOME/.config}/nnn/plugins`. You can run the `getplugs` plugin later to update the plugins. It backs up earlier plugins.
|
||||
|
||||
**NOTE:** `getplugs` also downloads the launcher `nlaunch` and tries to place it at `/usr/local/bin/` using `sudo`. If it fails you have to place `nlauch` manually somewhere in your `$PATH`.
|
||||
|
||||
|
|
|
@ -15,7 +15,7 @@ fi
|
|||
|
||||
mkdir -p $PLUGIN_DIR
|
||||
cd $PLUGIN_DIR
|
||||
wget -nv --show-progress https://github.com/jarun/nnn/archive/master.tar.gz
|
||||
curl -Ls -O https://github.com/jarun/nnn/archive/master.tar.gz
|
||||
tar -xf master.tar.gz
|
||||
cp -vf nnn-master/plugins/* .
|
||||
sudo mv -vf nnn-master/misc/nlaunch/nlaunch /usr/local/bin/
|
||||
|
|
|
@ -15,7 +15,7 @@ if [ $cur_ver == $new_ver ]; then
|
|||
fi
|
||||
|
||||
# get the package
|
||||
wget "https://github.com/jarun/nnn/releases/download/v$new/nnn_$new-1_debian9.amd64.deb"
|
||||
curl -Ls -O "https://github.com/jarun/nnn/releases/download/v$new/nnn_$new-1_debian9.amd64.deb"
|
||||
|
||||
# install it
|
||||
sudo dpkg -i nnn_$new-1_debian9.amd64.deb
|
||||
|
|
Loading…
Reference in a new issue