diff --git a/README.md b/README.md index feedb2e3..69760800 100644 --- a/README.md +++ b/README.md @@ -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 ace53750..8ee61b85 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,
sort uniq xargs | List non-empty duplicate files in current dir | | checksum | sh | md5sum,
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),
[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 a8d8ec18..e144be39 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 83b9949f..8dd3b5a9 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