Feature Request: show service name in prompt
- 主要言語
- Python
- スター
- 13.4k
- フォーク
- 612
- 平均マージ
- 6日 14時間
- マージ済み PR(30日)
- 10
説明
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.
コントリビューションガイド
調査の方向性
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.
索引モデルが issue の本文から書いたものです。
評価
- 技術スタック
- postgresql, python
- 領域
- cli, databases
- issue の種類
- 機能追加
- 難易度
- 3/5
- 見積もり時間
- 1〜2日
- 活発さ
- 活発
- 明瞭さ
- おおむね明確
- 初心者へのやさしさ
- 68/100