From 58e736ae586db4588c348b6a9c1c718b5942302f Mon Sep 17 00:00:00 2001 From: Adar Nimrod <nimrod@shore.co.il> Date: Tue, 5 Jun 2018 14:06:14 +0300 Subject: [PATCH] fixup! Interactive sudo usage will pass shell function definitions. --- .bashrc | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/.bashrc b/.bashrc index 2a80078..d293161 100644 --- a/.bashrc +++ b/.bashrc @@ -271,8 +271,10 @@ then [ ! -f "$sourcefile" ] || . "$sourcefile" done ! command -v direnv > /dev/null || eval "$(direnv hook bash)" - alias sudo="sudo -E bash -c" eval "$(declare -F | sed 's/declare/export/g')" + sudo () { + command sudo -E bash -c "$*" + } fi -- GitLab