diff options
author | Tom Ryder <tom@sanctum.geek.nz> | 2018-12-11 14:52:11 +1300 |
---|---|---|
committer | Tom Ryder <tom@sanctum.geek.nz> | 2018-12-11 14:52:11 +1300 |
commit | 6e8c6c521ae5d60427634be01b82fe61a79f192b (patch) | |
tree | 5349fc3e9838c69dbb6fd69f0234ea921ea446ea /sh/shrc.d/ed.sh | |
parent | Factor out zsh ENV hack into one file (diff) | |
download | dotfiles-6e8c6c521ae5d60427634be01b82fe61a79f192b.tar.gz dotfiles-6e8c6c521ae5d60427634be01b82fe61a79f192b.zip |
Refactor some conditionals
Diffstat (limited to 'sh/shrc.d/ed.sh')
-rw-r--r-- | sh/shrc.d/ed.sh | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/sh/shrc.d/ed.sh b/sh/shrc.d/ed.sh index e6b6eee8..dc8433f6 100644 --- a/sh/shrc.d/ed.sh +++ b/sh/shrc.d/ed.sh @@ -12,16 +12,18 @@ ed() { fi # Add --verbose to explain errors - [ -e "$HOME"/.cache/sh/opt/ed/verbose ] && + if [ -e "$HOME"/.cache/sh/opt/ed/verbose ] ; then set -- --verbose "$@" + fi # Add an asterisk prompt (POSIX feature) set -- -p\* "$@" # Run in rlwrap(1) if available set -- ed "$@" - command -v rlwrap >/dev/null 2>&1 && + if command -v rlwrap >/dev/null 2>&1 ; then set -- rlwrap --history-filename=/dev/null "$@" + fi # Run determined command command "$@" |