summaryrefslogtreecommitdiffstats
path: root/e
blob: d3efac5b67694fba8526e775b7dd626b27a500be (plain)
1
2
3
4
5
6
7
8
9
#!/bin/sh

FILE=$(readlink -f "$1")

if [ $(id -u) -eq 0 ]; then
    exec sudo -u "$SUDO_USER" emacsclient -n "/sudo::$FILE"
else
    exec emacsclient -n "$FILE"
fi