busybox:ash:PS1:支持的内部替换变量
网上资料没查到,那就找源码呗!
xxx\libbb\lineedit.c
/* * Supported via bb_process_escape_sequence: * \a ASCII bell character (07) * \e ASCII escape character (033) * \n newline * \r carriage return * \\ backslash * \nnn char with octal code nnn
* Supported: * \$ if the effective UID is 0, a #, otherwise a $ * \w current working directory, with $HOME abbreviated with a tilde * Note: we do not support $PROMPT_DIRTRIM=n feature * \W basename of the current working directory, with $HOME abbreviated with a tilde * \h hostname up to the first '.' * \H hostname * \u username * \[ begin a sequence of non-printing characters * \] end a sequence of non-printing characters * \T current time in 12-hour HH:MM:SS format * \@ current time in 12-hour am/pm format * \A current time in 24-hour HH:MM format * \t current time in 24-hour HH:MM:SS format * (all of the above work as \A) * Not supported: * \! history number of this command * \# command number of this command * \j number of jobs currently managed by the shell * \l basename of the shell's terminal device name * \s name of the shell, the basename of $0 (the portion following the final slash) * \V release of bash, version + patch level (e.g., 2.00.0) * \d date in "Weekday Month Date" format (e.g., "Tue May 26") * \D{format} * format is passed to strftime(3). * An empty format results in a locale-specific time representation. * The braces are required. * Mishandled by bb_process_escape_sequence: * \v version of bash (e.g., 2.00) */
分类:
Linux
【推荐】国内首个AI IDE,深度理解中文开发场景,立即下载体验Trae
【推荐】编程新体验,更懂你的AI,立即体验豆包MarsCode编程助手
【推荐】抖音旗下AI助手豆包,你的智能百科全书,全免费不限次数
【推荐】轻量又高性能的 SSH 工具 IShell:AI 加持,快人一步
· 无需6万激活码!GitHub神秘组织3小时极速复刻Manus,手把手教你使用OpenManus搭建本
· C#/.NET/.NET Core优秀项目和框架2025年2月简报
· Manus爆火,是硬核还是营销?
· 终于写完轮子一部分:tcp代理 了,记录一下
· 【杭电多校比赛记录】2025“钉耙编程”中国大学生算法设计春季联赛(1)
2009-06-09 Mysql:命令选项、配置选项、(全局、会话)系统变量、状态变量:各种应用程序及选项
2009-06-09 Mysql:事务管理——未完待续