dunkle colony
  • Communities
  • Create Post
  • Create Community
  • heart
    Support Lemmy
  • search
    Search
  • Login
  • Sign Up
洪 民憙 (Hong Minhee)@lemmy.ml to General Programming Discussion@lemmy.mlEnglish · 2 months ago

Your CLI's completion should know what options you've already typed

hackers.pub

external-link
message-square
0
link
fedilink
0
external-link

Your CLI's completion should know what options you've already typed

hackers.pub

洪 民憙 (Hong Minhee)@lemmy.ml to General Programming Discussion@lemmy.mlEnglish · 2 months ago
message-square
0
link
fedilink
The latest update to Optique implements a sophisticated dependency system that enables command-line interface options to dynamically influence one another during parsing and shell completion. While standard parsers often treat flags in isolation, this framework allows for context-aware behavior similar to Git, where the value of one option determines the valid suggestions for another. By utilizing new primitives such as dependency and derive, developers can mark specific options as sources that inform the behavior of subsequent parsers through a three-phase execution strategy. This approach first collects dependency values and then applies them via factory functions to generate concrete, context-specific parsers at runtime. The system maintains full type safety while supporting both synchronous and asynchronous resolutions, which is essential for scenarios involving file system operations or remote API calls. Furthermore, it handles multiple dependencies seamlessly, ensuring complex relationships between parameters like environments and regions are validated correctly. This advancement empowers developers to create highly responsive and intuitive CLI tools that provide a superior user experience through intelligent, context-sensitive completion.
alert-triangle
You must log in or register to comment.

General Programming Discussion@lemmy.ml

programming@lemmy.ml

Subscribe from Remote Instance

Create a post
You are not logged in. However you can subscribe from another Fediverse account, for example Lemmy or Mastodon. To do this, paste the following into the search field of your instance: !programming@lemmy.ml

A general programming discussion community.

Rules:

  1. Be civil.
  2. Please start discussions that spark conversation

Other communities

  • !python@lemmy.ml
  • !powershell@lemmy.ml
  • !julia@lemmy.ml
  • !iosprogramming@lemmy.ml

Systems

  • !rust@lemmy.ml
  • !cpp@lemmy.ml
  • !c_programming@lemmy.ml

Functional Programming

  • !haskell@lemmy.ml
  • !fpcomplete@lemmy.ml

Also related

  • !opensource@lemmy.ml
Visibility: Public
globe

This community can be federated to other instances and be posted/commented in by their users.

  • 13 users / day
  • 31 users / week
  • 47 users / month
  • 163 users / 6 months
  • 1 local subscriber
  • 9.81K subscribers
  • 117 Posts
  • 28 Comments
  • Modlog
  • mods:
  • Evan@lemmy.ml
  • Restioson@lemmy.ml
  • BE: 0.19.11
  • Modlog
  • Instances
  • Docs
  • Code
  • join-lemmy.org