aboutsummaryrefslogtreecommitdiffstats
path: root/plugins/chmodx
diff options
context:
space:
mode:
authorGravatar Arun Prakash Jana <engineerarun@gmail.com>2020-01-02 05:11:00 +0530
committerGravatar Arun Prakash Jana <engineerarun@gmail.com>2020-01-02 05:11:00 +0530
commite1c91e1aefc1a20e738fc1b4d5b2a612ff959ffd (patch)
tree459d0e4fce4eed9a893b30bb84e969ebd7e2ce58 /plugins/chmodx
parentff72917e72a783081db4b73939d6d094c863eaf7 (diff)
downloadnnn-e1c91e1aefc1a20e738fc1b4d5b2a612ff959ffd.tar.gz
Plugin rename
Diffstat (limited to 'plugins/chmodx')
-rwxr-xr-xplugins/chmodx14
1 files changed, 14 insertions, 0 deletions
diff --git a/plugins/chmodx b/plugins/chmodx
new file mode 100755
index 0000000..1ad8467
--- /dev/null
+++ b/plugins/chmodx
@@ -0,0 +1,14 @@
+#!/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