blob: 7cef29e608911d2a8f1332f4eb0b295298dc9234 (
plain) (
tree)
|
|
# 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.
ed() {
if [[ -t 0 ]] ; then
command ed -p: "$@"
else
command ed "$@"
fi
}
|