Skip to content
Ilya Sher edited this page Sep 2, 2023 · 8 revisions

Context Design

( This document is work in progress. At the moment it's mostly dumpster of thoughts. )

Context is anything that would affect execution of following commands. Think of it as a generalization of current directory and environment variables.

Context will be playing one of the central roles in the UI.

Requirements

  • Context types
    • "File". At least participate in completion, probably by file type. Exact semantics TBD.
    • "Directory".
    • "Environment variables" (one or more environment variable set as a group)
    • AWS
      • "AWS profile"
      • "AWS tags"
        • In read type operations, the resources will be filtered by given tags
        • In write type operations, the resources will be tagged with given tags
      • "AWS lambda function name"
      • CloudFormation stack
      • List of AWS services in use (for the profile / account)
    • "git branch" (per directory context)
    • "String". TBD. Copy+paste buffer?
    • View settings
      • "Filters". Per type default filters.
      • "Columns". Per type columns to display.
      • "Sorting". Per type sorting.
    • "Aliases"
    • "Objects of Interest". Objects to watch and notify about changes automatically.
    • "Plugins". Per plugin enabled/disabled and settings.
  • Automatically detect contexts. Examples: directory (cd blah), environment variables.
  • Per-directory contexts (roughly .env functionality)
  • Facility to create new contexts. Example: Creating context of type "AWS profile" will include modifying the configuration file.
  • Resolved context, important for sharing. Examples:
    • AWS profile -> AWS account number
    • cd relative_dir -> absolute dir (not sure actually good for sharing)
  • UI specific context such as theme?
  • It should be possible to share context.
  • TBD: combining contexts, possibly hierarchical

Open Issues

  • Relation to bookmarks
  • UI to mark any object on the screen as a context?