For custom commands, allow yakut to read a map file

Open
#91 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
4/5
Estimated time
3-5 days
Newbie friendliness
35/100
Issue type
Feature
Clarity
Mostly clear
Activity status
Stale
Tech stack
python
Domain
cli

Research direction

Start at the command handling for yakut cmd and inspect existing configuration conventions. Define how a known-location YAML, JSON, or INI map is loaded, validated for duplicate names, numbers, and limits, and used by name. Done means yakut cmd X foo resolves the configured number while existing numeric commands continue to work.

Written by the indexing model from the issue text.

Description

The file could be yaml or json or ini, but would map commands in words to command numbers. It could be automatically read in from known location like a ~/.yakut/custom_commands.yaml

---
custom_commands:
    - number: 300
       name: foo
    - number: 301 
       name: bar

This would allow users to do:

yakut cmd X foo instead of yakut cmd X 300 which is not descriptive.

These could be also checked for duplicates and limits (like predefined values).

Dominant language
Python
Stars
69
Forks
14
PR merge metrics
No merged PRs in 30d

Getting set up

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from OpenCyphal/yakut

All issues in OpenCyphal/yakut

Similar issues

More Python issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.