From d011bf1ac85e1cfd15df7cf70fa9744ba50f1260 Mon Sep 17 00:00:00 2001 From: tea Date: Sat, 10 Aug 2024 23:34:42 +0200 Subject: [PATCH] zsh: make se run editor as normal for root --- .config/zsh/aliases.zsh | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/.config/zsh/aliases.zsh b/.config/zsh/aliases.zsh index 4098c88..cee2f41 100644 --- a/.config/zsh/aliases.zsh +++ b/.config/zsh/aliases.zsh @@ -45,7 +45,11 @@ if [[ ${VISUAL} == *emacs(client|remote)* ]]; then fi else alias e="${VISUAL}" - alias se="${sucmd} ${VISUAL}" + if [[ "${EUID}" != "0" ]]; then + alias se="${sucmd} ${VISUAL}" + else + alias se="${VISUAL}" + fi fi alias ta="tmux attach -t tastytea || tmux new-session -s tastytea"