From 74b457d9719df8ca810de9cbf964784ccee5b866 Mon Sep 17 00:00:00 2001 From: Tom Ryder Date: Wed, 16 Oct 2013 20:58:21 +1300 Subject: Check for presence of binaries before script setup --- bash/bashrc.d/ed.bash | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'bash/bashrc.d/ed.bash') 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. -- cgit v1.2.3