dotfiles

configuration files for shell, text editor, graphical environment, etc.
git clone git://src.adamsgaard.dk/dotfiles
Log | Files | Refs | README | LICENSE Back to index

commit 478980ee087eca7c15deafbb9c15cdda3effbd5e
parent 6c75638e1789b48bc4068915e6f30712242c0efd
Author: Anders Damsgaard <anders@adamsgaard.dk>
Date:   Thu, 26 Sep 2019 12:32:28 +0200

Use doas for SU editing instead of sudo if available

Diffstat:
M.config/sh/commands | 6+++++-
1 file changed, 5 insertions(+), 1 deletion(-)

diff --git a/.config/sh/commands b/.config/sh/commands @@ -1,7 +1,11 @@ #!/bin/sh alias e='$EDITOR' -alias se='sudo $EDITOR' +if type doas >/dev/null 2>&1; then + alias se='doas $EDITOR' +else + alias se='sudo $EDITOR' +fi alias n='$FILE' alias sx="sxiv -ft *" alias youtube-dl='youtube-dl -f bestvideo+bestaudio/best --all-subs --embed-subs'