nushell/crates/nu-command/src
David Matos ccd72fa64a
Error out when config.nu has no editor configured (#8282)
# Description
Fixes #8245. Instead of trying to use `nano` or `notepad` as defaults,
it errors out if finds that `buffer_editor` , $EDITOR, $VISUAL do not
exist.

If the PR is landed, Ill update the website as it means what its in
there is no longer correct.
```
❯ config nu
Error: 
  × No editor configured
   ╭─[entry #3:1:1]
 1 │ config nu
   · ────┬────
   ·     ╰── Please specify one via environment variables $EDITOR or $VISUAL
   ╰────
  help: Nushell's config file can be found with the command: $nu.config-path. For more help: (https://nushell.sh/book/configuration.html#configurations-with-built-in-commands)
  
  ``` 
# User-Facing Changes

# Tests + Formatting


Make sure you've run and fixed any issues with these commands:

- [X]  `cargo fmt --all -- --check` to check standard code formatting (`cargo fmt --all` applies these changes)
- [X] `cargo clippy --workspace -- -D warnings -D clippy::unwrap_used -A clippy::needless_collect` to check that you're using the standard code style
- [X] `cargo test --workspace` to check that all tests pass

# After Submitting

If your PR had any user-facing changes, update [the documentation](https://github.com/nushell/nushell.github.io) after the PR is merged, if necessary. This will help us keep the docs up to date.
2023-03-09 08:07:20 -06:00
..
bits Document and critically review ShellError variants - Ep. 1 (#8229) 2023-03-01 20:34:48 +01:00
bytes Document and critically review ShellError variants - Ep. 2 (#8326) 2023-03-06 11:31:07 +01:00
charting Document and critically review ShellError variants - Ep. 3 (#8340) 2023-03-06 18:33:09 +01:00
conversions fixed an error message that popped up after landing (#8356) 2023-03-07 19:02:48 -06:00
database Document and critically review ShellError variants - Ep. 3 (#8340) 2023-03-06 18:33:09 +01:00
dataframe Fix to json for SQLite databases (#8343) 2023-03-06 14:36:26 -08:00
date Fix 8244 -- store timestamps with nanosecond resolution (consistently) (#8337) 2023-03-07 17:02:15 -06:00
debug Uniformize usage() and extra_usage() message ending for commands helper. (#8268) 2023-02-28 21:33:02 -08:00
deprecated Uniformize usage() and extra_usage() message ending for commands helper. (#8268) 2023-02-28 21:33:02 -08:00
env Error out when config.nu has no editor configured (#8282) 2023-03-09 08:07:20 -06:00
experimental Uniformize usage() and extra_usage() message ending for commands helper. (#8268) 2023-02-28 21:33:02 -08:00
filesystem Revert to notify v4 (#8367) 2023-03-08 21:45:58 -08:00
filters Document and critically review ShellError variants - Ep. 3 (#8340) 2023-03-06 18:33:09 +01:00
formats Fix to json for SQLite databases (#8343) 2023-03-06 14:36:26 -08:00
generators Document and critically review ShellError variants - Ep. 2 (#8326) 2023-03-06 11:31:07 +01:00
hash Document and critically review ShellError variants - Ep. 1 (#8229) 2023-03-01 20:34:48 +01:00
math Document and critically review ShellError variants - Ep. 1 (#8229) 2023-03-01 20:34:48 +01:00
misc Uniformize usage() and extra_usage() message ending for commands helper. (#8268) 2023-02-28 21:33:02 -08:00
network Document and critically review ShellError variants - Ep. 3 (#8340) 2023-03-06 18:33:09 +01:00
path Document and critically review ShellError variants - Ep. 3 (#8340) 2023-03-06 18:33:09 +01:00
platform Document and critically review ShellError variants - Ep. 2 (#8326) 2023-03-06 11:31:07 +01:00
random Document and critically review ShellError variants - Ep. 3 (#8340) 2023-03-06 18:33:09 +01:00
shells Document and critically review ShellError variants - Ep. 3 (#8340) 2023-03-06 18:33:09 +01:00
strings FIX: redirect to encode base64 as hash bash64 is deprecated (#8351) 2023-03-07 20:04:54 +01:00
system Document and critically review ShellError variants - Ep. 3 (#8340) 2023-03-06 18:33:09 +01:00
viewers Uniformize usage() and extra_usage() message ending for commands helper. (#8268) 2023-02-28 21:33:02 -08:00
default_context.rs Remove the 'env' command, as we have the variable (#8185) 2023-03-01 21:20:00 +13:00
example_test.rs cratification: Example support (#8231) 2023-02-27 13:58:56 -08:00
input_handler.rs Standardise the use of ShellError::UnsupportedInput and ShellError::TypeMismatch and add spans to every instance of the former (#7217) 2022-12-23 01:48:53 -05:00
lib.rs Cratification: Break out nu_cmd_lang into a separate crate (#8181) 2023-02-24 09:54:42 -06:00
progress_bar.rs cp progress bar implementation (#8012) 2023-02-22 11:57:38 -08:00
sort_utils.rs Document and critically review ShellError variants - Ep. 3 (#8340) 2023-03-06 18:33:09 +01:00