haskell / haskell/haskeline

alignment surprise when displaying tab-completions

Open
#114 4 comments 0 reactions 0 assignees View on GitHub
Dominant language
Haskell
Stars
247
Forks
82
PR merge metrics
No merged PRs in 30d

Description

![image](https://user-images.githubusercontent.com/538571/53698291-a398a200-3da8-11e9-883f-8b223d910007.png)

I tried using ANSI sequences in the `display` field, but it threw off the alignment of the presented completions:

![image](https://user-images.githubusercontent.com/538571/53698297-cd51c900-3da8-11e9-96f6-0d9a8bdc5530.png)

I naively tried inserting a call to `stringToGraphemes` in `Completion.makeLines` but realized that's a different sort of thing. What do you think about some way to strip out escape sequences or to provide a length directly?

Contributor guide

No contributing guide indexed for this repository

Research direction

Start by reading Completion.makeLines and the existing use of stringToGraphemes in the completion display path. Reproduce the reported alignment issue with ANSI sequences in the display field, then determine and document the chosen handling; done means tab-completion columns remain aligned when displayed text contains escape sequences.

Written by the indexing model from the issue text.

Assessment

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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.