LogoopenSUSE Build Service > Projects
Sign Up | Log In

View File mksh-vendor-mkshrc.patch of Package mksh (Project shells)

Index: mksh/main.c
===================================================================
--- mksh.orig/main.c
+++ mksh/main.c
@@ -648,6 +648,11 @@ main_init(int argc, const char *argv[],
 	else if (Flag(FTALKING)) {
 		char *env_file;
 
+#if defined(MKSH_VENDOR_MKSHRC_PATH) && !defined(MKSH_LEGACY_MODE)
+		/* include vendor mkshrc */
+		include(MKSH_VENDOR_MKSHRC_PATH, 0, NULL, true);
+#endif
+
 		/* include $ENV */
 		env_file = substitute(substitute("${ENV:-" MKSHRC_PATH "}", 0),
 		    DOTILDE);
Index: mksh/mksh.1
===================================================================
--- mksh.orig/mksh.1
+++ mksh/mksh.1
@@ -366,6 +366,10 @@ parameter after subjecting it to paramet
 substitution; if unset or empty, the user mkshrc profile is processed;
 otherwise, if a file whose name is the substitution result exists,
 it is processed; non-existence is silently ignored.
+If enabled at compile time, all interactive shells process a vendor-supplied
+initialization file before the
+.Ev ENV
+parameter or user mkshrc profile is processed.
 .Ss Command syntax
 The shell begins parsing its input by removing any backslash-newline
 combinations, then breaking it into