From 87bf89f7b0fdf22498f3a8c82deacb5c3c154c2c Mon Sep 17 00:00:00 2001
From: Adar Nimrod <nimrod@shore.co.il>
Date: Fri, 15 Mar 2019 20:57:45 +0200
Subject: [PATCH] Another stab at sudo with shell functions (mainly monitor).

---
 .bashrc | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/.bashrc b/.bashrc
index 2e8a496..d07b780 100644
--- a/.bashrc
+++ b/.bashrc
@@ -111,6 +111,11 @@ alias color='less --raw-control-chars -p'
 alias pip2='python2 -m pip'
 alias pip3='python3 -m pip'
 
+sudome () (
+    eval "$(declare -F | sed 's/^declare/export/g')"
+    sudo -E "$SHELL" -c "$@"
+)
+
 monitor () {
     eval "$@"
     code="$?"
-- 
GitLab