Skip to content

Commit e630900

Browse files
committed
linuxcnc_info: show ofile name if no valid VIEWER
1 parent 80bba07 commit e630900

1 file changed

Lines changed: 4 additions & 1 deletion

File tree

scripts/linuxcnc_info.in

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,8 @@ git_commit () {
4646

4747
# try to find a visual editor to show created file
4848
# use list with existing preference first, then other common editors
49-
editors="$VISUAL gedit mousepad geany nedit gvim abiword"
49+
editors="$VISUAL gedit mousepad geany nedit nano gvim abiword"
50+
VIEWER=""
5051
for e in $editors ; do
5152
if [ -x "$(command -v $e)" ] ; then
5253
VIEWER=$e
@@ -62,6 +63,8 @@ while getopts hs OPT; do
6263
esac
6364
done
6465

66+
[ -z "$VIEWER" ] && echo "No VIEWER: output to $ofile"
67+
6568
# all subsequent output:
6669
exec 1>$ofile
6770
exec 2>&1

0 commit comments

Comments
 (0)