influxdata / influxdata/influx-cli
Bug in influx v1 shell: Rapid cursor movement introduces garbage chars in command line
Nobody has claimed this yet.
- Dominant language
- Go
- Stars
- 75
- Forks
- 22
- PR merge metrics
- No merged PRs in 30d
Description
**Summary:**
Rapid key-repeat (holding down right or left arrow key) to move the cursor in the command line introduce garbage characters.
**Info + how to reproduce:**
I run the latest version of influx CLI on a Debian 11 machine (package: influxdb2-cli 2.7.3-1).
```
# influx version
Influx CLI dev (git: none) build_date: 2023-04-28T14:24:14Z
```
I run the v1 shell and connect to my InfluxDB v2 (also latest version, on the same Debian 11 machine).
```
# influx v1 shell
InfluxQL Shell dev
Connected to InfluxDB OSS v2.7.5
> use Main
> precision rfc3339
```
I now I type a long command and then move the cursor rapidly back and forth (right and left).
Suddenly garbage characters (ANSI escape codes?) are introduced into my command line.
Ex:
I type "SHOW TAG VALUES" and hold down right arrow 4 seconds, left arrow 4 seconds, repeat.
I test again.
I test with just the word "fooooo".
```
> > > > > > > > > > > > > > SHOW TA?[C?[CG VALUES
>
> > > > > > > > > > > > > > > > > > S?> S?> S?> S?> S?[D?[DHOW TAG VA?[D?[DLUES
>
> > > > > > > > > > > ?[D?[Cfooooo?[C?[C
```
It looks like parts of visible and invisible ANSI sequences are left in the command line, messing things up.
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by reproducing the issue in the influx v1 shell on Debian 11, using rapid left and right arrow input as described. Trace the command-line input and ANSI escape handling; done means repeated cursor movement leaves no garbage characters in the entered command.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- go
- Domain
- cli
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 38/100