mirror of
https://git.disroot.org/FollieHiyuki/dotfiles.git
synced 2024-12-12 00:58:58 -05:00
d4499953cf
Also WMs: clean up application rules
17 lines
312 B
Bash
Executable File
17 lines
312 B
Bash
Executable File
#!/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 "$EDITOR" "$1"
|
|
elif type sudoedit >/dev/null 2>&1; then
|
|
sudoedit "$1"
|
|
elif type doas >/dev/null 2>&1; then
|
|
doas "$EDITOR" "$1"
|
|
fi
|