From c92c5c7b1576dd3ab13c055ed399ad0f09d74bbc Mon Sep 17 00:00:00 2001 From: Arun Prakash Jana Date: Thu, 2 Jan 2020 23:13:56 +0530 Subject: Support toggle exe --- plugins/README.md | 1 - plugins/autojump | 3 ++- plugins/chmodx | 14 -------------- 3 files changed, 2 insertions(+), 16 deletions(-) delete mode 100755 plugins/chmodx (limited to 'plugins') diff --git a/plugins/README.md b/plugins/README.md index 25c5b57..ecc0478 100644 --- a/plugins/README.md +++ b/plugins/README.md @@ -18,7 +18,6 @@ Plugins extend the capabilities of `nnn`. They are _executable_ scripts (or bina | boom | Play random music from dir | sh | [moc](http://moc.daper.net/) | | dups | List non-empty duplicate files in current dir | sh | find, md5sum,
sort uniq xargs | | chksum | Create and verify checksums | sh | md5sum,
sha256sum | -| chmodx | Toggle executable status of hovered file | sh | chmod | | diffs | Diff for selection (limited to 2 for directories) | sh | vimdiff | | dragdrop | Drag/drop files from/into nnn | sh | [dragon](https://github.com/mwh/dragon) | | fzcd | Change to the directory of a fuzzy-selected file/dir | sh | fzf/fzy
fd/fdfind/find | diff --git a/plugins/autojump b/plugins/autojump index b30530f..ef39dd9 100755 --- a/plugins/autojump +++ b/plugins/autojump @@ -15,5 +15,6 @@ if which autojump >/dev/null 2>&1; then odir="$(autojump "$dir")" printf "%s" "0$odir" > "$NNN_PIPE" else - exit 1 + printf "autojump missing" + read -r _ fi diff --git a/plugins/chmodx b/plugins/chmodx deleted file mode 100755 index 1ad8467..0000000 --- a/plugins/chmodx +++ /dev/null @@ -1,14 +0,0 @@ -#!/usr/bin/env sh - -# Description: Toggle executable status of hovered file -# -# Shell: POSIX compliant -# Author: Arun Prakash Jana - -if ! [ -z "$1" ]; then - if [ -x "$1" ]; then - chmod -x "$1" - else - chmod +x "$1" - fi -fi -- cgit v1.2.3-70-g09d2