aboutsummaryrefslogtreecommitdiff
path: root/sh/shrc.d/ed.sh
diff options
context:
space:
mode:
Diffstat (limited to 'sh/shrc.d/ed.sh')
-rw-r--r--sh/shrc.d/ed.sh6
1 files changed, 5 insertions, 1 deletions
diff --git a/sh/shrc.d/ed.sh b/sh/shrc.d/ed.sh
index d7d3fa2f..e6b6eee8 100644
--- a/sh/shrc.d/ed.sh
+++ b/sh/shrc.d/ed.sh
@@ -1,3 +1,7 @@
+# Our ~/.profile should already have made a directory with the supported
+# options for us; if not, we won't be wrapping ed(1) with a function at all
+[ -d "$HOME"/.cache/sh/opt/ed ] || return
+
# Define function proper
ed() {
@@ -8,7 +12,7 @@ ed() {
fi
# Add --verbose to explain errors
- [ -e "$HOME"/.cache/ed/verbose ] &&
+ [ -e "$HOME"/.cache/sh/opt/ed/verbose ] &&
set -- --verbose "$@"
# Add an asterisk prompt (POSIX feature)