diff options
| author | 2019-11-16 10:36:39 +0530 | |
|---|---|---|
| committer | 2019-11-16 10:36:39 +0530 | |
| commit | e82f6d02cdbfda3afbc66997adf15c8b4a2a5317 (patch) | |
| tree | c9096acc53ac07d17eb53358d3bb519b75cf2f8a /plugins/exetoggle | |
| parent | 2b4bd35ba66756b4b3df3678a8dfc1ee47693d7f (diff) | |
| download | nnn-e82f6d02cdbfda3afbc66997adf15c8b4a2a5317.tar.gz | |
Plugin extoggle to toggle executable status
Diffstat (limited to 'plugins/exetoggle')
| -rwxr-xr-x | plugins/exetoggle | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/plugins/exetoggle b/plugins/exetoggle new file mode 100755 index 0000000..1ad8467 --- /dev/null +++ b/plugins/exetoggle @@ -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 |