prompt_prefix not getting correctly picked up dynamically on config changes

Aperta
#260 4 commenti 0 reazioni 0 assegnatari Vedi su GitHub

I maintainer di solito rispondono entro 1 giorno

Nessuno ha ancora preso questa issue.

Valutazione

Difficoltà
3/5
Tempo stimato
1-2 giorni
Idoneità per principianti
45/100
Tipo di issue
Bug
Chiarezza
Abbastanza chiara
Stato di attività
Ferma
Stack tecnologico
rust
Ambito
cli

Direzione di ricerca

Inizia tracciando il comportamento di caricamento della configurazione e di monitoraggio dei file descritto nei log, quindi riproduci il problema con ~/.config/shpool/config.toml e l'impostazione prompt_prefix. Il lavoro è completato quando le modifiche a prompt_prefix e keybinding vengono applicate dinamicamente, anche quando il file di configurazione viene passato con -c o --config-file.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Descrizione

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 ============================
[...]
Lingua principale
Rust
Stelle
2k
Fork
70
Merge medio
2g 3h
PR unite (30g)
6

Preparare l'ambiente

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Altre issue di shell-pool/shpool

Tutte le issue di shell-pool/shpool

Issue simili

Altre issue su Rust

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.