diff options
author | VG <vg@devys.org> | 2016-01-24 18:27:20 +0100 |
---|---|---|
committer | VG <vg@devys.org> | 2016-01-24 18:27:20 +0100 |
commit | 8c3ce92e29095539e5581535da5201782306eb06 (patch) | |
tree | 54d47df6b85fbccd5b132f4cf62f061ff78c0fca | |
parent | e4af2866cdf0a99b3cc5a1b4552329d3c59d15e2 (diff) | |
download | bulkrename-8c3ce92e29095539e5581535da5201782306eb06.tar.gz bulkrename-8c3ce92e29095539e5581535da5201782306eb06.tar.bz2 bulkrename-8c3ce92e29095539e5581535da5201782306eb06.zip |
add error message for controlling/interactive terminal for clarity
-rwxr-xr-x | bulkrename | 4 |
1 files changed, 2 insertions, 2 deletions
@@ -9,11 +9,11 @@ if [ $# -ne 0 ] ; then exit fi -[ -x "$(which "$EDITOR" 2>/dev/null)" ] || EDITOR='vi' +EDITOR="${EDITOR:-vi}" file=/tmp/blkrn-$$ cat > ${file}.1 -exec </dev/tty >/dev/tty +exec </dev/tty >/dev/tty || { echo 'Interactive terminal needed' >&2; exit; } cp ${file}.1 ${file}.2 "$EDITOR" ${file}.2 |