Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[feat] 增加用户自定义扩展命令配置 & 命令交流区 #19

Open
enomothem opened this issue Jul 13, 2024 · 2 comments
Open

[feat] 增加用户自定义扩展命令配置 & 命令交流区 #19

enomothem opened this issue Jul 13, 2024 · 2 comments
Assignees
Labels
enhancement New feature or request

Comments

@enomothem
Copy link
Owner

enomothem commented Jul 13, 2024

该想法由永恒之锋战队rvy提出,目的是让工具成为一个载体,让用户自己去定义一些根据自身经验总结出的命令配置到工具中。

目前的思路是将配置文件引入作为一个额外的扩展,当然,为了保持轻量化的需求,仅作为一个可选项。

判断流程如下:

  • 在脚本目录下是否存在配置文件。
  • 如果存在文件那么将可以使用参数-z测试填写的命令是否生效。
  • EXT参数控制是否将扩展的命令同步适用于Normal打印、文本输出、Html输出中。参数为 true、false
  • 默认不提供配置文件,用户可自行生成文件进行配置。文件名为chief-inspector.conf

以下是文件内的基本信息:

EXT="true"
commands=(
    "ps -aux|进程信息"
    "ifconfig|路由信息"
)

该版本初步实现将在下一个中版本更新中新增。

@enomothem enomothem added the enhancement New feature or request label Jul 13, 2024
@enomothem enomothem self-assigned this Jul 13, 2024
@enomothem enomothem changed the title [fit] 增加用户自定义扩展命令配置 [feat] 增加用户自定义扩展命令配置 Jul 13, 2024
@enomothem
Copy link
Owner Author

默认配置更改至~/.whok/chief-inspector.conf,另外,支持指定配置文件,如果不指定,则会自动生成配置文件在默认路径下。

@enomothem
Copy link
Owner Author

欢迎大家把自己平时积累的好用的命令分享出来,让大家一起看看,谁的命令更加丝滑。

@enomothem enomothem pinned this issue Jul 13, 2024
@enomothem enomothem changed the title [feat] 增加用户自定义扩展命令配置 [feat] 增加用户自定义扩展命令配置 & 命令交流区 Jul 13, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant