mirror of
https://github.com/jarun/nnn.git
synced 2024-11-28 05:41:31 +00:00
Plugin extoggle to toggle executable status
This commit is contained in:
parent
2b4bd35ba6
commit
e82f6d02cd
|
@ -13,6 +13,7 @@ The currently available plugins are listed below.
|
||||||
| dups | sh | find, md5sum,<br>sort uniq xargs | List non-empty duplicate files in current dir |
|
| dups | sh | find, md5sum,<br>sort uniq xargs | List non-empty duplicate files in current dir |
|
||||||
| checksum | sh | md5sum,<br>sha256sum | Create and verify checksums |
|
| checksum | sh | md5sum,<br>sha256sum | Create and verify checksums |
|
||||||
| dragdrop | sh | [dragon](https://github.com/mwh/dragon) | Drag/drop files from/into nnn |
|
| dragdrop | sh | [dragon](https://github.com/mwh/dragon) | Drag/drop files from/into nnn |
|
||||||
|
| exetoggle | sh | chmod | Toggle executable status of hovered file |
|
||||||
| fzcd | sh | fzy/fzf<br>(optional fd) | Change to the directory of a fuzzy-selected file/dir |
|
| fzcd | sh | fzy/fzf<br>(optional fd) | Change to the directory of a fuzzy-selected file/dir |
|
||||||
| fzy-open | sh | fzy, xdg-open | Fuzzy find a file in dir subtree and edit or xdg-open |
|
| fzy-open | sh | fzy, xdg-open | Fuzzy find a file in dir subtree and edit or xdg-open |
|
||||||
| getplugs | sh | curl | Update plugins |
|
| getplugs | sh | curl | Update plugins |
|
||||||
|
|
14
plugins/exetoggle
Executable file
14
plugins/exetoggle
Executable file
|
@ -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
|
Loading…
Reference in a new issue