prompt_prefix not getting correctly picked up dynamically on config changes

Đang mở
#260 4 bình luận 0 reaction 0 người được giao Xem trên GitHub

Maintainer thường phản hồi trong vòng 1 ngày

Chưa có ai nhận issue này.

Đánh giá

Độ khó
3/5
Thời gian dự kiến
1-2 ngày
Mức phù hợp với người mới
45/100
Loại issue
Lỗi
Độ rõ ràng
Khá rõ ràng
Mức độ hoạt động
Đình trệ
Công nghệ
rust
Lĩnh vực
cli

Hướng nghiên cứu

Bắt đầu bằng cách lần theo hành vi tải cấu hình và theo dõi tệp được mô tả trong các log, sau đó tái hiện sự cố với ~/.config/shpool/config.toml và thiết lập prompt_prefix. Được xem là hoàn tất khi các thay đổi đối với prompt_prefix và keybinding được áp dụng động, kể cả khi tệp cấu hình được truyền bằng -c hoặc --config-file.

Do mô hình lập chỉ mục viết ra từ nội dung của issue.

Mô tả

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 ============================
[...]
Ngôn ngữ chính
Rust
Star
2k
Fork
70
Merge trung bình
2 ngày 3 giờ
Pull request đã merge (30 ngày)
6

Chuẩn bị môi trường

Bắt đầu từ đâu

  1. Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
  2. Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
  3. Fork repository và làm thay đổi trên một nhánh.
  4. Mở pull request có tham chiếu số hiệu của issue.

Issue khác của shell-pool/shpool

Tất cả issue của shell-pool/shpool

Issue tương tự

Thêm issue về Rust

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.