nushell/crates/nu-cmd-base/src
Bruce Weirdan ab641d9f18
Fix the order of preference for VISUAL and EDITOR (#14275)
# Description

The order in which Nushell consulted `$env.EDITOR` and `$env.VISUAL` was
wrong. Most other programs check `$env.VISUAL` first and then fall back
to `$env.EDITOR` (for historic reasons).

References:

*
https://wiki.archlinux.org/title/Environment_variables#Default_programs
*
https://help.ubuntu.com/community/EnvironmentVariables#Preferred_application_variables
 * https://unix.stackexchange.com/a/4861
 * https://git-scm.com/docs/git-var

# User-Facing Changes

Users will now be able to use those preferences variables the same way
they are used in other programs.

# Tests + Formatting

That part wasn't tested before, and I don't think it's necessary to test
it now.

# After Submitting

PR to the docs repo is here: nushell/nushell.github.io#1621
2024-11-06 17:01:57 -06:00
..
formats Use Record's public API in a bunch of places (#10927) 2023-11-08 14:24:00 +01:00
hook.rs Refactor config updates (#13802) 2024-10-11 18:40:32 +02:00
input_handler.rs Add and use new Signals struct (#13314) 2024-07-07 22:29:01 +00:00
lib.rs Add top-level crate documentation/READMEs (#12907) 2024-07-14 10:10:41 +02:00
util.rs Fix the order of preference for VISUAL and EDITOR (#14275) 2024-11-06 17:01:57 -06:00