Skip to content

v2.0-beta2

Pre-release
Pre-release

Choose a tag to compare

@swiftycode256 swiftycode256 released this 20 Jul 14:50
· 530 commits to latest-STABLE since this release

Beta版本已知问题

  • 因为目前无法实现stdout和stderr保留原输出顺序同时显示:
    • 定义文件中subststdoutonly和subststderronly选项目前不可用
    • 使用clitheme-exec --debug时,输出标记会永远显示输出为stdout(o>)
  • 命令行输出替换功能暂不支持Windows系统
    • 该功能会推迟到v2.1版本

最新的代码更改和开发版本:https://github.com/swiftycode256/clitheme/tree/v1.2_dev

文档手册:https://github.com/swiftycode256/clitheme-wiki-repo/

Known issues (Beta version)

  • Because redirecting stdout and stderr to separate streams cannot guarantee original output order as of now:
    • The subststdoutonly and subststderronly options in theme definition file is currently unavailable
    • The output marker will always show that output is stdout (o>) when using clitheme-exec --debug
  • Command line output substitution feature does not currently support Windows systems
    • This feature will be delayed for version v2.1

Latest code changes and development version: https://github.com/swiftycode256/clitheme/tree/v1.2_dev

Documentation: https://github.com/swiftycode256/clitheme-wiki-repo/

v2.0-beta2更新内容

新功能

  • {manpage_section}中支持同时指定多个[file_content]语句及文件名:
{manpage_section}
    [file_content] man1 example.1
    [file_content] man1 zh_CN example.1
    [file_content] man1 zh_CN.UTF-8 example.1
        <文件内容>
    [/file_content]
{/manpage_section}
  • 在{manpage_section}中新增[include_file]语法,允许同时指定多个目标文件路径:
{manpage_section}
    [include_file] files pages example.1
        as man1 example.1
        as man1 zh_CN example.1
        as man1 zh_CN.UTF-8 example.1
    [/include_file]
{/manpage_section}
  • 定义文件中{substrules_section}中的filter_command和[filter_commands]新增foregroundonly选项;仅在当前进程前台运行时应用替换规则
    • 适用于shell等命令处理器程序;它们在执行进程时会转移前台进程
  • clitheme-exec:新增--debug-foreground选项;会通过提示信息显示当前进程前台状态的更改,使用! Foreground: False和! Foreground: True显示
  • 定义文件中{substrules_section}的[/substitute_string]和[/substitute_regex]后支持指定substesc和substvar选项,会应用在匹配内容上
  • 定义文件中{entries_section}的[/entry]后支持指定substvar选项,会应用在路径名称上

问题修复与改进

  • CLI 提示信息中的名称如果有控制符号或其他不可见的字符,这些字符将会以明文输出
  • 修复Python 3.8兼容性问题
  • 修复了使用clitheme-man时按下CTRL-C会导致程序意外中断的问题
  • 修复了在Windows命令提示符下,终端控制字符会意外地显示在屏幕上的问题
  • 定义文件{substrules_section}:修复了当用户输入的命令与在带有strictcmdmatch命令匹配选项的命令限制规则中相等,有关的匹配规则不会被应用的问题
  • 修复了{entries_section}中的“同时指定多个定义名称”功能无法正常使用的问题
  • 全面修复clitheme-exec中的应用程序兼容性问题
  • 定义文件:优化命令限制条件内容相同但匹配机制选项不同的情况处理
  • 定义文件:修复了使用多行内容段落时可能会意外出现「选项不允许在这里指定」的错误提示
  • 定义文件:修复并优化内容变量处理
  • 定义文件:修复在{manpage_section}中输入未知语法词语不会提示错误的问题

v2.0-beta2 update changelog

New features

  • Support specifying multiple [file_content] phrases and filenames in {manpage_section}:
{manpage_section}
    [file_content] man1 example.1
    [file_content] man1 zh_CN example.1
    [file_content] man1 zh_CN.UTF-8 example.1
        <File content>
    [/file_content]
{/manpage_section}
  • New [include_file] syntax in {manpage_section}, supporting specifying multiple target file paths at once:
{manpage_section}
    [include_file] files pages example.1
        as man1 example.1
        as man1 en_US example.1
        as man1 en_US.UTF-8 example.1
    [/include_file]
{/manpage_section}
  • New foregroundonly option for filter_command and [filter_commands] in {substrules_section}; only apply substitution rules if process is in foreground state
    • Applicable for shell and other command interpeter applications that changes foreground state when executing processes
  • clitheme-exec: new --debug-foreground option; outputs message when foreground state changes (shown as ! Foreground: False and ! Foreground: True)
  • Support specifying substesc and substvar options on [/substitute_string] and [/substitute_regex] in {substrules_section}; affects match expression
  • Support specifying substvar on [/entry] in {entries_section}; affects path name

Bug fixes and improvements

  • Non-printable characters in CLI output messages will be displayed in its plain-text representation
  • Fix compatibility issues with Python 3.8
  • Fixes an issue where pressing CTRL-C in clitheme-man causes the program to unexpectedly terminate
  • Fixes an issue where terminal control characters are unexpectedly displayed on screen in Windows Command Prompt
  • Theme definition file {substrules_section}: Fixes and issue where substitution rules with strictcmdmatch option are not applied if executed command arguments are the same in command filter
  • Fixes an issue where "specifying multiple [entry] phrases" feature in {entries_section} does not work properly
  • Fix many compatibility issues with applications in clitheme-exec
  • Theme definition file: Optimize processing of command filter definitions with same commands and different match options
  • Theme definition file: Fix unexpected "Option not allowed here" error when using multi-line content blocks
  • Theme definition file: Fix and optimize content variable processing
  • Theme definition file: Fix missing "Unexpected phrase" error in {manpage_section} when encountering invalid file syntax