diff options
Diffstat (limited to 'e')
-rwxr-xr-x | e | 6 |
1 files changed, 4 insertions, 2 deletions
@@ -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 |