Feature Request: show service name in prompt
- Lingua principale
- Python
- Stelle
- 13.4k
- Fork
- 612
- Merge medio
- 6g 14h
- PR unite (30g)
- 10
Descrizione
I primarily use `pgcli service=svc_name` to start pgcli with everything defined in `~/.pg_service.conf`. I would like the ability for that service name to appear in the prompt. I currently use `\h` to show the hostname, but but our hosts are things like `psql-dept-tier-azflexdb-application`, and I'd much prefer to just see my `svc_name` in the prompt.
It looks like `prompt_dsn` is only provided to the `PGCli` class for the purpose of displaying in the prompt. If we're connecting to a service name, **that** value could be provided instead, perhaps?
I could just redefine the services as `alias_dsn`, but we use other tools that use the standard pg_service file, so I really don't want to define them twice.
Guida per i contributori
Apri la guida per i contributori
Direzione di ricerca
Start at the PGCli entry point and trace how prompt_dsn is supplied and rendered, then inspect the handling of the service=svc_name connection option. Done means a connection launched with a pg_service.conf service displays svc_name in the prompt while existing prompt behavior remains unchanged.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Valutazione
- Stack tecnologico
- postgresql, python
- Ambito
- cli, databases
- Tipo di issue
- Funzionalità
- Difficoltà
- 3/5
- Tempo stimato
- 1-2 giorni
- Stato di attività
- Attiva
- Chiarezza
- Abbastanza chiara
- Idoneità per principianti
- 68/100