← Commit list

2a1317544

Mike Frysinger
Mike Frysinger
2006-06-06
SOURCE BUG Duration: 58s

Subject

make the default prompt suck less when using fancy prompts

SOURCE BUG

This commit was genuinely broken at the time (not related to our build system): scripts/config/mkconfigs.c (2005-08-01 - 2006-10-05 arasi) uretilen bbconfigopts.h icine .config satirlarini kacissiz, ham newline'larla gömüyordu - gecerli C degildi, busybox'un kendi bb_mkdep araci bile parse edemiyordu (7d219aab7 ile duzeltildi, mkconfigs shell scripte cevrildi)

→ Bu hatanin tam hikayesini ve duzeltme diffini gor

Binary

No binary (build failed)

Architecture & Compiler Flags

Architecture: x86_64-linux-gnu Compiler: gcc (Ubuntu 11.4.0-1ubuntu1~22.04.3) 11.4.0

—

Build Log

(log yok)

Commit Diff GitHub →

shell/msh.c+11 -2
@@ -93,6 +93,15 @@ int mshdbg_rc = 0;
#endif /* MSHDEBUG */
+#ifdef CONFIG_FEATURE_SH_FANCY_PROMPT
+# define DEFAULT_ROOT_PROMPT "\\u:\\w> "
+# define DEFAULT_USER_PROMPT "\\u:\\w$ "
+#else
+# define DEFAULT_ROOT_PROMPT "# "
+# define DEFAULT_USER_PROMPT "$ "
+#endif
+
+
/* -------- sh.h -------- */
/*
* shell
@@ -877,9 +886,9 @@ int msh_main(int argc, char **argv)
#ifdef CONFIG_FEATURE_SH_FANCY_PROMPT
if (prompt->value == null)
#endif
- setval(prompt, "$ ");
+ setval(prompt, DEFAULT_USER_PROMPT);
if (geteuid() == 0) {
- setval(prompt, "# ");
+ setval(prompt, DEFAULT_ROOT_PROMPT);
prompt->status &= ~EXPORT;
}
cprompt = lookup("PS2");