summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMatthias Schiffer <mschiffer@universe-factory.net>2010-07-26 20:59:42 +0200
committerMatthias Schiffer <mschiffer@universe-factory.net>2010-07-26 20:59:42 +0200
commitccf1c051d96bc84349da873c7bf70a0de9338953 (patch)
tree6409f47b0d63134c43631d1d3defb91066a1dcdc
parentc33ff191110ae2505334792952e0ee551e06698f (diff)
downloadutils-ccf1c051d96bc84349da873c7bf70a0de9338953.tar
utils-ccf1c051d96bc84349da873c7bf70a0de9338953.zip
Improved whitespace handling -.-
-rwxr-xr-xe6
-rwxr-xr-xedit6
2 files changed, 8 insertions, 4 deletions
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
diff --git a/edit b/edit
index de514c1..3e8d8ac 100755
--- a/edit
+++ b/edit
@@ -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