From ccf1c051d96bc84349da873c7bf70a0de9338953 Mon Sep 17 00:00:00 2001 From: Matthias Schiffer Date: Mon, 26 Jul 2010 20:59:42 +0200 Subject: Improved whitespace handling -.- --- e | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'e') diff --git a/e b/e index c214982..d3efac5 100755 --- a/e +++ b/e @@ -1,7 +1,9 @@ #!/bin/sh +FILE=$(readlink -f "$1") + if [ $(id -u) -eq 0 ]; then - exec sudo -u neoraider emacsclient -n /sudo::$(readlink -f $1) + exec sudo -u "$SUDO_USER" emacsclient -n "/sudo::$FILE" else - exec emacsclient -n $(readlink -f $1) + exec emacsclient -n "$FILE" fi -- cgit v1.2.3