Hacktoberfest 2026:メンテナが10月に向けて印を付けた、オープンで初心者向けの issue。 Hacktoberfest の issue を見る

Feature Request: show service name in prompt

オープン
#1,624 コメント 0 件 リアクション 0 件 担当者 0 名 GitHub で見る

まだ誰も着手していません。

評価

難易度
3/5
見積もり時間
1〜2日
初心者へのやさしさ
68/100
issue の種類
機能追加
明瞭さ
おおむね明確
活発さ
活発
技術スタック
postgresql, python
領域
cli, databases

調査の方向性

PGCli のエントリポイントから始めて、prompt_dsn がどのように渡され、レンダリングされるかを追跡し、続いて接続オプション service=svc_name の処理を調べます。pg_service.conf のサービスを指定して起動した接続がプロンプトに svc_name を表示し、既存のプロンプトの動作が変わらない状態になれば完了です。

索引モデルが issue の本文から書いたものです。

説明

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.

主要言語
Python
スター
13.4k
フォーク
613
平均マージ
12時間 45分
マージ済み PR(30日)
5

コントリビューションガイド

コントリビューションガイドを開く

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

dbcli/pgcli のほかの issue

dbcli/pgcli の issue をすべて見る

似ている issue

Python の issue をもっと見る

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。