diff options
author | 2020-01-02 23:13:56 +0530 | |
---|---|---|
committer | 2020-01-02 23:36:08 +0530 | |
commit | c92c5c7b1576dd3ab13c055ed399ad0f09d74bbc (patch) | |
tree | ca7323488eb18be71f0d9af814e6ad23e1febbec /plugins | |
parent | e1c91e1aefc1a20e738fc1b4d5b2a612ff959ffd (diff) | |
download | nnn-c92c5c7b1576dd3ab13c055ed399ad0f09d74bbc.tar.gz |
Support toggle exe
Diffstat (limited to 'plugins')
-rw-r--r-- | plugins/README.md | 1 | ||||
-rwxr-xr-x | plugins/autojump | 3 | ||||
-rwxr-xr-x | plugins/chmodx | 14 |
3 files changed, 2 insertions, 16 deletions
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,<br>sort uniq xargs | | chksum | Create and verify checksums | sh | md5sum,<br>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<br>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 |