diff options
author | Ludovic Courtès <ludo@gnu.org> | 2015-11-11 22:59:35 +0100 |
---|---|---|
committer | Ludovic Courtès <ludo@gnu.org> | 2015-11-11 23:29:20 +0100 |
commit | 6237b9fa39c6ab3283c50b96520b990c8612abc1 (patch) | |
tree | d7c527387ab8895ce2da49f243be94af761d09fa /guix/scripts/edit.scm | |
parent | 6d2e833495f8bd63ea3893c23a0762ad88a11cef (diff) | |
download | gnu-guix-6237b9fa39c6ab3283c50b96520b990c8612abc1.tar gnu-guix-6237b9fa39c6ab3283c50b96520b990c8612abc1.tar.gz |
edit: Honor $VISUAL.
Suggested by Andreas Enge <andreas@enge.fr>.
* guix/scripts/edit.scm (%editor): Honor 'VISUAL' before 'EDITOR'.
(show-help): Adjust accordingly.
* doc/guix.texi (Invoking guix edit): Likewise.
Diffstat (limited to 'guix/scripts/edit.scm')
-rw-r--r-- | guix/scripts/edit.scm | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/guix/scripts/edit.scm b/guix/scripts/edit.scm index 0509148c4d..73a5bb78d2 100644 --- a/guix/scripts/edit.scm +++ b/guix/scripts/edit.scm @@ -38,7 +38,7 @@ (define (show-help) (display (_ "Usage: guix edit PACKAGE... -Start $EDITOR to edit the definitions of PACKAGE...\n")) +Start $VISUAL or $EDITOR to edit the definitions of PACKAGE...\n")) (newline) (display (_ " -h, --help display this help and exit")) @@ -48,7 +48,8 @@ Start $EDITOR to edit the definitions of PACKAGE...\n")) (show-bug-report-information)) (define %editor - (make-parameter (or (getenv "EDITOR") "emacsclient"))) + (make-parameter (or (getenv "VISUAL") (getenv "EDITOR") + "emacsclient"))) (define (search-path* path file) "Like 'search-path' but exit if FILE is not found." |