Skip to content

config: command-specific options could be grouped better #6911

Closed

Description

@webbedspace

Related problem

I notice that there are a few places in the config where things could be grouped better and named more efficiently by enclosing them in sub-records - mainly involving the command-specific configs.

Describe the solution you'd like

Here are my recommendations:

config.use_ls_colors -> config.ls.use_ls_colors (I was going to shorten this further, but LS_COLORS is actually the name of a shell standard that this invokes.)
config.show_clickable_links_in_ls -> config.ls.clickable_links
config.rm_always_trash -> config.rm.always_trash
config.cd_with_abbreviations -> config.cd.abbreviations
config.max_history_size -> config.history.max_size
config.sync_history_on_enter -> config.history.sync_on_enter
config.history_file_format -> config.history.file_format
config.case_sensitive_completions -> config.completions.case_sensitive
config.enable_external_completion -> config.completions.external.enable (this cleans up a singular vs. plural discrepancy)
config.quick_completions -> config.completions.quick
config.partial_completions -> config.completions.partial
config.max_external_completion_results -> config.completions.external.max_results

Examples:

let-env config = {
  ls: {
    use_ls_colors: true,
    clickable_links: true,
  },
  rm: { 
    always_trash: true,
  },
  cd: {
    abbreviations: true,
  }
  history: {
    file_format: "sqlite",
    sync_on_enter: true,
  }
  completions: {
    quick:true,
    partial: true,
    case_sensitive: true,
    external: {
        enable: true,
       max_results:200,
    }
  }
  ...
}

The existing config options can be deprecated (and the new options prioritised over them).

Describe alternatives you've considered

No response

Additional context and details

The rm and cd records may be a little empty, but they allow more additions to be added later.

Activity

  1. added
    A:configuration
    notes:breaking-changes
    on Oct 26, 2022
  2. added a commit that references this issue on Nov 19, 2022
    7479173
  3. added this to the v0.72 milestone on Nov 20, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    A:configurationcategory:enhancementnotes:breaking-changes

    Type

    No type

    Projects

    No projects

      Milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions