[Request] Retrieve the partial user input on text prompt cancelation
Nessuno ha ancora preso questa issue.
Valutazione
- Difficoltà
- 3/5
- Tempo stimato
- 1-2 giorni
- Idoneità per principianti
- 48/100
- Tipo di issue
- Funzionalità
- Chiarezza
- Abbastanza chiara
- Stato di attività
- Ferma
- Stack tecnologico
- nodejs, typescript
- Ambito
- cli
Direzione di ricerca
Inizia dal metodo text di @clack/prompts e dalla personalizzazione di TextPrompt menzionata nell’issue. Verifica se l’input parziale è disponibile quando si verifica l’annullamento, quindi definisci il risultato dell’annullamento in modo che i chiamanti possano recuperare un input non vuoto e distinguere annullamenti vuoti ripetuti; verifica che il comportamento esistente di TextPrompt rimanga invariato.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Descrizione
Is your feature request related to a problem? Please describe.
Currently, when using the @clack/prompts text prompt, all that is returned is either the user entered value (if submitted) or the cancel symbol (if canceled). When the request is canceled, there is no way to know what the user had typed up to that point.
Describe the solution you'd like
I would like to get a way to retrieve what the user had for input when it canceled the request. This is to implement a feature similar to the node CLI, where canceling with a non-empty value clears the input, while canceling with an empty value twice in a row triggers an exit.
Describe alternatives you've considered
For now I have to treat empty and non-empty values in the same way. I was considering re-implementing the text method, but feels a lot of work (the great TextPrompt customization would need to be duplicated) and I'm not even sure if the data would be available there to begin with.
- Lingua principale
- TypeScript
- Stelle
- 8.1k
- Fork
- 217
- Merge medio
- 1g 11h
- PR unite (30g)
- 5
Guida per i contributori
Apri la guida per i contributori
Come iniziare
- Leggi tutta la issue e poi la guida ai contributi del progetto.
- Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
- Fai un fork del repository e lavora su un branch.
- Apri una pull request che faccia riferimento al numero della issue.
Altre issue di bombshell-dev/clack
-
Difficoltà 5/5 Più di una settimana Idoneità per principianti 30/100
bombshell-dev/clack#597 ·
-
rfc: accessible mode Apertaenhancement
Difficoltà 5/5 Più di una settimana Idoneità per principianti 35/100
bombshell-dev/clack#585 · 1 commento · 1 reazione ·
-
bug
Difficoltà 3/5 1-2 giorni Idoneità per principianti 68/100
bombshell-dev/clack#573 · 1 commento · 2 reazioni ·
-
enhancement
Difficoltà 3/5 1-2 giorni Idoneità per principianti 62/100
bombshell-dev/clack#565 · 1 commento · 1 reazione ·
-
enhancement
Difficoltà 4/5 3-5 giorni Idoneità per principianti 48/100
bombshell-dev/clack#564 · 1 reazione ·
Tutte le issue di bombshell-dev/clack
Issue simili
-
VerificationGate: ATTRIBUTION quote guard never matches a normal quotation (\b around the quote) Aperta
Difficoltà 2/5 1-3 ore Idoneità per principianti 75/100
danielmiessler/LifeOS#2234 ·
-
T: Bug
Difficoltà 2/5 1-3 ore Idoneità per principianti 75/100
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 65/100
-
Difficoltà 1/5 Meno di un'ora Idoneità per principianti 85/100
-
Mend: dependency security vulnerability untriaged
Difficoltà 2/5 1-3 ore Idoneità per principianti 70/100