diff options
author | Tom Ryder <tom@sanctum.geek.nz> | 2014-12-05 14:29:53 +1300 |
---|---|---|
committer | Tom Ryder <tom@sanctum.geek.nz> | 2014-12-05 14:29:53 +1300 |
commit | 625a12ca063f17021203bd8863d4184c58cb2e0e (patch) | |
tree | 35a16b7963fc3fcc551c8a18ec4db6fb12af0fcd /bash/bashrc.d | |
parent | Mention pa script (diff) | |
download | dotfiles-625a12ca063f17021203bd8863d4184c58cb2e0e.tar.gz dotfiles-625a12ca063f17021203bd8863d4184c58cb2e0e.zip |
Try to use ed -v
Diffstat (limited to 'bash/bashrc.d')
-rw-r--r-- | bash/bashrc.d/ed.bash | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/bash/bashrc.d/ed.bash b/bash/bashrc.d/ed.bash index 1a7a2b63..5a54c761 100644 --- a/bash/bashrc.d/ed.bash +++ b/bash/bashrc.d/ed.bash @@ -1,9 +1,13 @@ # 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. +# however. Also try and use -v for more verbose error output. ed() { if [[ -t 0 ]] ; then - command ed -p: "$@" + if ed -sv - </dev/null >/dev/null 2>&1 ; then + command ed -vp: "$@" + else + command ed -p: "$@" + fi else command ed "$@" fi |