summaryrefslogtreecommitdiffstats
path: root/edit
diff options
context:
space:
mode:
authorMatthias Schiffer <mschiffer@universe-factory.net>2010-07-25 19:15:37 +0200
committerMatthias Schiffer <mschiffer@universe-factory.net>2010-07-25 19:15:37 +0200
commitc33ff191110ae2505334792952e0ee551e06698f (patch)
treed090aee5fc5a557c86434843ab7fb8cc5cde9c0d /edit
parent4abab142a54a41f92160b2daf8c72b149947110e (diff)
downloadutils-c33ff191110ae2505334792952e0ee551e06698f.tar
utils-c33ff191110ae2505334792952e0ee551e06698f.zip
Added emacsclient wrappers
Diffstat (limited to 'edit')
-rwxr-xr-xedit7
1 files changed, 7 insertions, 0 deletions
diff --git a/edit b/edit
new file mode 100755
index 0000000..de514c1
--- /dev/null
+++ b/edit
@@ -0,0 +1,7 @@
+#!/bin/sh
+
+if [ $(id -u) -eq 0 ]; then
+ exec sudo -u neoraider emacsclient -nw /sudo::$(readlink -f $1)
+else
+ exec emacsclient -nw $(readlink -f $1)
+fi