pimutils / pimutils/khal

`khal new -i` is too unforgiving when mistakes are made

Open
#1,341 0 comments 1 reaction 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Python
Stars
3.1k
Forks
233
Avg merge
1h 44m
Merged PRs (30d)
1

Description

To Reproduce

khal new -i
calendar: personal    
summary: an event created via khal new -i
datetime range: 3d
critical: Could not parse "3d".
critical: Please check your configuration or run `khal printformats` to see if this does match your configured [long](date|time|datetime)format.
critical: If you suspect a bug, please file an issue at https://github.com/pimutils/khal/issues/ 

Actual behavior
If any mistake, the creation process must start from scratch, providing again every valid field.

Expected behavior
khal should just prompt over and over until it gets SIGINT, or maybe escape, or enter on empty input.

If applicable: Stack Trace
n / a

OS, version, khal version and how you installed it:

  • The output of khal --version: khal, version 0.11.3
  • Installation method: Alpine distro package
  • python version Python 3.11.8
  • OS [e.g. arch] Alpine Linux

Contributor guide

Open the contributing guide

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.

Research direction

Start by running khal new -i and trace the interactive creation entry point that handles the datetime range prompt. Reproduce the 3d parsing failure and determine how invalid input currently exits; done means the prompt can retry after a mistake and still permits the documented termination behavior.

Written by the indexing model from the issue text.

Assessment

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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.