diff options
author | Arun Prakash Jana <engineerarun@gmail.com> | 2019-09-27 21:01:55 +0530 |
---|---|---|
committer | Arun Prakash Jana <engineerarun@gmail.com> | 2019-09-27 21:13:01 +0530 |
commit | 2c3b5e2f78cf7b82d242da978d820d7beda2d90a (patch) | |
tree | 3c9c13154bba9ff15f05f306c553add8c279c4a8 | |
parent | 65c986b70a1eb8de9b06da7488509a68d1976627 (diff) | |
download | nnn-2c3b5e2f78cf7b82d242da978d820d7beda2d90a.tar.gz |
Add command to download plugins
-rw-r--r-- | README.md | 2 | ||||
-rw-r--r-- | plugins/README.md | 12 | ||||
-rwxr-xr-x | plugins/getplugs | 2 | ||||
-rwxr-xr-x | plugins/upgrade | 2 |
4 files changed, 11 insertions, 7 deletions
@@ -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) diff --git a/plugins/README.md b/plugins/README.md index ace5375..8ee61b8 100644 --- a/plugins/README.md +++ b/plugins/README.md @@ -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`. diff --git a/plugins/getplugs b/plugins/getplugs index a8d8ec1..e144be3 100755 --- a/plugins/getplugs +++ b/plugins/getplugs @@ -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/ diff --git a/plugins/upgrade b/plugins/upgrade index 83b9949..8dd3b5a 100755 --- a/plugins/upgrade +++ b/plugins/upgrade @@ -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 |