prompt_prefix not getting correctly picked up dynamically on config changes

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

メンテナーはふだん 1 日以内に返信

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

評価

難易度
3/5
見積もり時間
1〜2日
初心者へのやさしさ
45/100
issue の種類
バグ
明瞭さ
おおむね明確
活発さ
停滞
技術スタック
rust
領域
cli

調査の方向性

まず、ログに記載されている設定の読み込みとファイル監視の動作を追跡し、次に ~/.config/shpool/config.toml と prompt_prefix 設定を使って問題を再現します。完了とは、設定ファイルを -c または --config-file で渡した場合も含め、prompt_prefix と keybinding の変更が動的に適用されることを意味します。

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

説明

What happened
I created a ~/.config/shpool/config.toml file, but setting prompt_prefix or keybinding in there has no effect. I've also tried explicitly passing the file with -c or --config-file to no avail. -v and --verbose don't give me any extra detail, either.

prompt_prefix = "testing testing testing"

What I expected to happen
The prompt prefix should have switched to "testing testing testing"

To Reproduce
Steps to reproduce the behavior:

  1. Install with cargo
  2. Run with a config file in the default location.
echo 'prompt_prefix = "testing testing testing"' > ~/.config/shpool/config.toml
shpool attach test
  1. Observe prompt prefix: shpool:test

Version info
shpool 0.9.2

Logs

2025-10-10T16:17:27.010881Z  INFO ThreadId(01) loading config from "/etc/shpool/config.toml"
2025-10-10T16:17:27.010911Z  WARN ThreadId(01) skip reading config file /etc/shpool/config.toml: Os { code: 2, kind: NotFound, message: "No such file or directory" }
2025-10-10T16:17:27.010919Z  INFO ThreadId(01) loading config from "/home/jagarber/.config/shpool/config.toml"
2025-10-10T16:17:27.010969Z  INFO ThreadId(01) starting with config: Config { norc: None, noecho: None, nosymlink_ssh_auth_sock: None, noread_etc_environment: None, nodaemonize: None, nodaemonize_timeout: None, shell: None, env: None, forward_env: None, initial_path: None, session_restore_mode: None, output_spool_lines: None, vt100_output_spool_width: None, keybinding: None, prompt_prefix: Some("testing testing testing"), motd: None, motd_args: None }
2025-10-10T16:17:27.010983Z  INFO ThreadId(01) new: new
2025-10-10T16:17:27.010988Z  INFO ThreadId(01) new:with_debounce: new
2025-10-10T16:17:27.011065Z  INFO ThreadId(01) new:with_debounce: close time.busy=74.4µs time.idle=2.35µs
2025-10-10T16:17:27.011071Z  INFO ThreadId(01) new: close time.busy=83.1µs time.idle=4.77µs
2025-10-10T16:17:27.011074Z  INFO ThreadId(01) watch: new
2025-10-10T16:17:27.011238Z  INFO ThreadId(03) run: new
2025-10-10T16:17:27.011274Z DEBUG ThreadId(03) run: now Instant { tv_sec: 5700642, tv_nsec: 981978283 } select with ddl None
2025-10-10T16:17:27.011284Z DEBUG ThreadId(03) run: addwatch: "/etc/shpool/config.toml"
2025-10-10T16:17:27.011622Z DEBUG ThreadId(03) run: Actually watching /etc, ic Some("shpool")
2025-10-10T16:17:27.011651Z DEBUG ThreadId(03) run: now Instant { tv_sec: 5700642, tv_nsec: 982357676 } select with ddl None
2025-10-10T16:17:27.011652Z  INFO ThreadId(01) watch: close time.busy=576µs time.idle=2.30µs
2025-10-10T16:17:27.011658Z  INFO ThreadId(01) watch: new
2025-10-10T16:17:27.011669Z DEBUG ThreadId(03) run: addwatch: "/home/jagarber/.config/shpool/config.toml"
2025-10-10T16:17:27.011702Z DEBUG ThreadId(03) run: Actually watching /home/jagarber/.config/shpool/config.toml, ic None
2025-10-10T16:17:27.011706Z DEBUG ThreadId(03) run: Force reload since now watching on target file
2025-10-10T16:17:27.011708Z DEBUG ThreadId(03) run: defer config reloading to Some(Instant { tv_sec: 5700643, tv_nsec: 82414967 })!
2025-10-10T16:17:27.011714Z DEBUG ThreadId(03) run: now Instant { tv_sec: 5700642, tv_nsec: 982420469 } select with ddl Some(Instant { tv_sec: 5700643, tv_nsec: 82414967 })
2025-10-10T16:17:27.011718Z  INFO ThreadId(01) watch: close time.busy=58.6µs time.idle=1.79µs
2025-10-10T16:17:27.011739Z  INFO ThreadId(01) daemon already running on "/run/user/9494/shpool/shpool.socket", no need to autodaemonize
2025-10-10T16:17:27.011742Z  INFO ThreadId(01) 

======================== STARTING ATTACH ============================
[...]
主要言語
Rust
スター
2k
フォーク
70
平均マージ
2日 3時間
マージ済み PR(30日)
6

環境構築

はじめの一歩

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

shell-pool/shpool のほかの issue

shell-pool/shpool の issue をすべて見る

似ている issue

Rust の issue をもっと見る

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

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