3 # Description: Toggles executable mode for selection
7 # Note: Works _only_ with selection (nnn can toggle the mode for the hovered file)
9 # Shell: POSIX compliant
10 # Author: Arun Prakash Jana
12 selection=${NNN_SEL:-${XDG_CONFIG_HOME:-$HOME/.config}/nnn/.selection}
14 if [ -s "$selection" ]; then
15 xargs -0 -I {} sh -c 'if [ -x "{}" ] ; then chmod -x "{}" ; else chmod +x "{}" ; fi' < "$selection"
18 if [ -p "$NNN_PIPE" ]; then
19 printf "-" > "$NNN_PIPE"