stardot / MatrixBrandy

Matrix Brandy BASIC VI for Linux, Windows, MacOSX
http://brandy.matrixnetwork.co.uk/
44 stars 8 forks source link

doesn't respect EDITOR environment variable #46

Closed scruss closed 5 years ago

scruss commented 5 years ago

Action:

export EDITOR=micro
brandy

or

EDITOR=micro brandy

Expected result: the EDIT command should open the temporary file in the editor of my choice

Actual result: the EDIT command opens the temporary file in vi, the editor of my very last resort.

Platform: Ubuntu Linux 19.04, x86_64

soruk42 commented 5 years ago

According to target.h the environment variable to use was BRANDY$EDITOR - but BASH doesn't like $ signs inside variables so I've renamed all the UNIX ones to BRANDY_EDITOR.

soruk42 commented 5 years ago

And - and enhancement just pushed. If BRANDY_EDITOR isn't set and you're on a UNIX/Linux platform it'll check EDITOR and VISUAL (in that order), and if none are set, it'll fall back on vi.