mirror of
https://github.com/hydroxycarbamide/dotfiles.git
synced 2025-05-07 21:39:07 -04:00
Add nnn
This commit is contained in:
parent
0ef5de12ac
commit
c0889285ff
58 changed files with 5175 additions and 0 deletions
16
dot_config/nnn/plugins/executable_suedit
Normal file
16
dot_config/nnn/plugins/executable_suedit
Normal file
|
@ -0,0 +1,16 @@
|
|||
#!/usr/bin/env sh
|
||||
|
||||
# Description: Edit file as superuser
|
||||
#
|
||||
# Shell: POSIX compliant
|
||||
# Author: Anna Arad
|
||||
|
||||
EDITOR="${EDITOR:-vim}"
|
||||
|
||||
if type sudo >/dev/null 2>&1; then
|
||||
sudo -E "$EDITOR" "$1"
|
||||
elif type sudoedit >/dev/null 2>&1; then
|
||||
sudoedit -E "$1"
|
||||
elif type doas >/dev/null 2>&1; then
|
||||
doas "$EDITOR" "$1"
|
||||
fi
|
Loading…
Add table
Add a link
Reference in a new issue