diff options
Diffstat (limited to 'edit')
-rwxr-xr-x | edit | 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 -nw /sudo::$(readlink -f $1) + exec sudo -u "$SUDO_USER" emacsclient -nw "/sudo::$FILE" else - exec emacsclient -nw $(readlink -f $1) + exec emacsclient -nw "$FILE" fi |