aboutsummaryrefslogtreecommitdiff
path: root/bash/bashrc.d/ed.bash
diff options
context:
space:
mode:
authorTom Ryder <tom@sanctum.geek.nz>2013-10-16 20:58:21 +1300
committerTom Ryder <tom@sanctum.geek.nz>2013-10-16 20:58:21 +1300
commit74b457d9719df8ca810de9cbf964784ccee5b866 (patch)
treeb77c25505788411564ac5aaa9194a22fd781a488 /bash/bashrc.d/ed.bash
parentAdd completion for pass(1) (diff)
downloaddotfiles-74b457d9719df8ca810de9cbf964784ccee5b866.tar.gz
dotfiles-74b457d9719df8ca810de9cbf964784ccee5b866.zip
Check for presence of binaries before script setup
Diffstat (limited to 'bash/bashrc.d/ed.bash')
-rw-r--r--bash/bashrc.d/ed.bash5
1 files changed, 5 insertions, 0 deletions
diff --git a/bash/bashrc.d/ed.bash b/bash/bashrc.d/ed.bash
index d4d92158..9f5fb5f2 100644
--- a/bash/bashrc.d/ed.bash
+++ b/bash/bashrc.d/ed.bash
@@ -1,3 +1,8 @@
+# Bail if no ed(1)
+if ! hash ed 2>/dev/null; then
+ return
+fi
+
# Add a colon prompt to ed when a command is expected rather than text; makes
# it feel a lot more like using ex. Only do this when stdin is a terminal,
# however.