Repository: casey/just
File: src/config.rs (Rust)

Code before:
pub(crate) const CHOOSE_HELP: &str = "Select one or more recipes to run using a binary. If \
                                      `--chooser` is not passed the chooser defaults to the value \
                                      of $JUST_CHOOSER, falling back to `fzf`";

pub(crate) const DEFAULT_SHELL: &str = "sh";
pub(crate) const DEFAULT_SHELL_ARG: &str = "-cu";

#[derive(Debug, PartialEq)]
pub(crate) struct Config {
  pub(crate) color:                Color,
  pub(crate) dry_run:              bool,
  pub(crate) highlight:            bool,
  pub(crate) invocation_directory: PathBuf,
  pub(crate) list_heading:         String,
  pub(crate) list_prefix:          String,
  pub(crate) load_dotenv:          bool,
  pub(crate) search_config:        SearchConfig,
  pub(crate) shell:                String,
  pub(crate) shell_args:           Vec<String>,
  pub(crate) shell_command:        bool,
  pub(crate) shell_present:        bool,
  pub(crate) subcommand:           Subcommand,
  pub(crate) unsorted:             bool,
  pub(crate) unstable:             bool,
  pub(crate) dotenv_filename:      String,
  pub(crate) dotenv_path:          PathBuf,
  pub(crate) verbosity:            Verbosity,
}

mod cmd {
  pub(crate) const CHANGELOG: &str = "CHANGELOG";
  pub(crate) const CHOOSE: &str = "CHOOSE";
  pub(crate) const COMMAND: &str = "COMMAND";
  pub(crate) const COMPLETIONS: &str = "COMPLETIONS";
  pub(crate) const DUMP: &str = "DUMP";
  pub(crate) const EDIT: &str = "EDIT";
  pub(crate) const EVALUATE: &str = "EVALUATE";
  pub(crate) const FORMAT: &str = "FORMAT";
  pub(crate) const INIT: &str = "INIT";
  pub(crate) const LIST: &str = "LIST";
  pub(crate) const SHOW: &str = "SHOW";
  pub(crate) const SUMMARY: &str = "SUMMARY";
  pub(crate) const VARIABLES: &str = "VARIABLES";

  pub(crate) const ALL: &[&str] = &[
    CHANGELOG,
    CHOOSE,
    COMMAND,
    COMPLETIONS,
    DUMP,
    EDIT,

Review comment (suggestion):
I think both of these will need to be options, and should be `None` if the flags aren't passed:

```suggestion
  pub(crate) dotenv_filename:      Option<OsString>,
  pub(crate) dotenv_path:          Option<PathBuf>,
```

We'll need to check if the flags were passed explicitly to determine if we should emit the deprecation warning.

Code after:
pub(crate) const CHOOSE_HELP: &str = "Select one or more recipes to run using a binary. If \
                                      `--chooser` is not passed the chooser defaults to the value \
                                      of $JUST_CHOOSER, falling back to `fzf`";

pub(crate) const DEFAULT_SHELL: &str = "sh";
pub(crate) const DEFAULT_SHELL_ARG: &str = "-cu";

#[derive(Debug, PartialEq)]
pub(crate) struct Config {
  pub(crate) color:                Color,
  pub(crate) dry_run:              bool,
  pub(crate) highlight:            bool,
  pub(crate) invocation_directory: PathBuf,
  pub(crate) list_heading:         String,
  pub(crate) list_prefix:          String,
  pub(crate) load_dotenv:          bool,
  pub(crate) search_config:        SearchConfig,
  pub(crate) shell:                String,
  pub(crate) shell_args:           Vec<String>,
  pub(crate) shell_command:        bool,
  pub(crate) shell_present:        bool,
  pub(crate) subcommand:           Subcommand,
  pub(crate) unsorted:             bool,
  pub(crate) unstable:             bool,
  pub(crate) dotenv_filename:      Option<String>,
  pub(crate) dotenv_path:          Option<PathBuf>,
  pub(crate) verbosity:            Verbosity,
}

mod cmd {
  pub(crate) const CHANGELOG: &str = "CHANGELOG";
  pub(crate) const CHOOSE: &str = "CHOOSE";
  pub(crate) const COMMAND: &str = "COMMAND";
  pub(crate) const COMPLETIONS: &str = "COMPLETIONS";
  pub(crate) const DUMP: &str = "DUMP";
  pub(crate) const EDIT: &str = "EDIT";
  pub(crate) const EVALUATE: &str = "EVALUATE";
  pub(crate) const FORMAT: &str = "FORMAT";
  pub(crate) const INIT: &str = "INIT";
  pub(crate) const LIST: &str = "LIST";
  pub(crate) const SHOW: &str = "SHOW";
  pub(crate) const SUMMARY: &str = "SUMMARY";
  pub(crate) const VARIABLES: &str = "VARIABLES";

  pub(crate) const ALL: &[&str] = &[
    CHANGELOG,
    CHOOSE,
    COMMAND,
    COMPLETIONS,
    DUMP,
    EDIT,