8go / 8go/matrix-commander-rs

Read line while being able to use <kbd>left arrow</kbd>

Offen
#214 2 Kommentare 0 Reaktionen 0 zugewiesene Personen Auf GitHub ansehen
Vorherrschende Sprache
Rust
Sterne
236
Forks
25
Ø Merge
4 Std. 30 Min.
Gemergte PRs (30 T.)
2

Beschreibung

For `--login password`, otherwise left arrow results in:

```bash
cargo run -- --login password --credentials . --store .
```

Output:

```
Finished `dev` profile [unoptimized + debuginfo] target(s) in 0.29s
Running `target/debug/matrix-commander-rs --login password --credentials . --store .`
Enter your Matrix homeserver (e.g. https://some.homeserver.org): ^[[D
```

`--credentials . --store .` helps to avoid:

```bash
cargo run -- --login password
```

Output:

```
Finished `dev` profile [unoptimized + debuginfo] target(s) in 0.28s
Running `target/debug/matrix-commander-rs --login password`
2026-06-29T13:42:02.711484Z ERROR matrix_commander_rs: Credentials file already exists. You have already logged in in the past. No login needed. Skipping login. If you really want to log in (i.e. create a new device), then logout first, or move credentials file manually. Or just run your command again but without the '--login' option to log in via your existing credentials and access token.
2026-06-29T13:42:02.711614Z ERROR matrix_commander_rs: Login to server failed or credentials information could not be written to disk. Check your arguments and try --login again. Reported error is: LoginUnnecessary
Error: LoginFailed
```

if already logged in.

Personal notes: [Benjamin_Loison/rust/issues/8](https://codeberg.org/Benjamin_Loison/rust/issues/8)

Beitragsleitfaden

Für dieses Repository ist kein Beitragsleitfaden indexiert

Rechercherichtung

Untersuche den Login-Ablauf in der CLI, wahrscheinlich in einem Modul, das die Benutzereingabe verarbeitet. Das Issue zeigt, dass die Eingabe der Pfeiltaste nach links falsch interpretiert wird (als ^[[D angezeigt). Untersuche, wie das Lesen von Zeilen implementiert ist, möglicherweise unter Verwendung von std::io oder einer Crate wie rustyline. Prüfe, ob der Raw-Terminalmodus oder eine ordnungsgemäße Zeilenbearbeitung erforderlich ist. Teste mit dem bereitgestellten Befehl, um das Problem zu reproduzieren.

Vom Indexierungsmodell aus dem Issue-Text verfasst.

Bewertung

Bereich
cli
Issue-Typ
Bug
Schwierigkeit
3/5
Geschätzter Aufwand
1-2 Tage
Aktivitätsstatus
Ruhig
Klarheit
Größtenteils klar
Anfängerfreundlichkeit
55/100

Neue Issues direkt in Ihr Postfach

Eine kurze Übersicht über anfängerfreundliche GitHub-Issues.