From f3334cea27fb4c2de949ea7189480ee47ee0e501 Mon Sep 17 00:00:00 2001 From: stefan schippers Date: Tue, 23 Sep 2025 22:19:19 +0200 Subject: [PATCH] evaluate xschemrc "postinit_commands" before loading schematics given on cmdline --- src/xinit.c | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/src/xinit.c b/src/xinit.c index 934189bf..a0d4bcd8 100644 --- a/src/xinit.c +++ b/src/xinit.c @@ -3079,6 +3079,11 @@ int Tcl_AppInit(Tcl_Interp *inter) /* */ tcleval("source_user_tcl_files"); + /* */ + /* Execute tcl commands given in tcl variable postinit_commands if existing */ + /* */ + tcleval("eval_postinit_commands"); + if(cli_opt_filename[0]) { char f[PATH_MAX]; int file_loaded = 1; @@ -3230,9 +3235,6 @@ int Tcl_AppInit(Tcl_Interp *inter) tcleval(cli_opt_tcl_post_command); } - /* Execute tcl commands given in tcl variable postinit_commands if existing */ - tcleval("eval_postinit_commands"); - if(cli_opt_quit) { char s[40]; my_snprintf(s, S(s), "exit %d", exit_code);