Skip to content

Commit

Permalink
doc: add toggle exe hack (#726)
Browse files Browse the repository at this point in the history
  • Loading branch information
doums authored Sep 3, 2024
1 parent 68fb6fa commit 9d802fa
Showing 1 changed file with 29 additions and 0 deletions.
29 changes: 29 additions & 0 deletions docs/en/src/awesome-hacks.md
Original file line number Diff line number Diff line change
Expand Up @@ -517,6 +517,35 @@ xplr.config.modes.builtin.default.key_bindings.on_key.T = {

</details>

### Toggle exe

Toggle the execute permission on the focused node.

<details>
<summary>Expand for details</summary>

- Author: [@doums]
- Requires: chmod
- Tested on: Linux

```lua
xplr.config.modes.builtin.default.key_bindings.on_key['*'] = {
help = 'toggle exe',
messages = {
{
BashExecSilently0 = [===[
f="$XPLR_FOCUS_PATH"
if [ -x "$f" ]; then chmod -x "$f"; else chmod +x "$f"; fi
"$XPLR" -m 'ExplorePwd'
"$XPLR" -m 'FocusPath: %q' "$f"
]===],
},
},
}
```

</details>

## Also See:

- [Awesome Plugins][15]
Expand Down

0 comments on commit 9d802fa

Please sign in to comment.