MobaXterm自定义关键字高亮(解决绿色不亮问题)

作用

终端中的一些关键字高亮可以提高我们的效率,本文是解决在部分关键字没有高亮的情况下,添加自定义关键字使其高亮

教程

打开设置
在这里插入图片描述

基于已有模式进行拓展
在这里插入图片描述

在已有Session中选择自定义的规则,重启MobaXterm即可
在这里插入图片描述

解决绿色不亮问题

由于软件bug,生成的已有规则存在问题,在不修改的情况下绿色关键字都可能不亮,所以大家可以导入我修改过的规则文件
在这里插入图片描述

[CustomSyntax]
Name=Custom
UseRegex=1
Underline=[^A-Za-z_&-](http(s)?://[A-Za-z0-9_.&?=%~#{}()@+-]+:?[A-Za-z0-9_./&?=%~#{}()@+-]+)[^A-Za-z0-9_-]
Red=[^A-Za-z_&-](fail|rejected|session closed|session disconnected|does not match|does not exist|(bad|wrong|incorrect|improper|invalid|unsupported|bad)( file| memory)? (descriptor|alloc(ation)?|addr(ess)?|owner(ship)?|arg(ument)?|param(eter)?|setting|length|filename)|not properly|improperly|(operation |connection |authentication |access |permission )?(denied|disallowed|not allowed|refused|problem|failed|failure|not permitted)|no [A-Za-z]+( [A-Za-z]+)? found|invalid|unsupported|not supported|seg(mentation )?fault|corruption|corrupted|corrupt|overflow|underrun|not ok|unimplemented|unsuccessfull|not implemented|permerrors?|fehlers?|errore|errors?|erreurs?|fejl|virhe|gre歬a|erro|fel|\(ee\)|\(ni\))[^A-Za-z_-]|[^\](\$\([^(\))╙+\)|`[^ `[^`╙+`)[^╙|[=>"':.,;({\[][ ]*(false|no valid signature found|no|ko)[ ]*[]=>"':.,;)} ]| false    | no    | ko    | down    | inactive    |[^A-Za-z_&-]administratively down[^A-Za-z_&-]
(descriptor|alloc(ation)?|addr(ess)?|owner(ship)?|arg(ument)?|param(eter)?|setting|length|filename)
|not properly|improperly|(operation |connection |authentication |access |permission )?
(denied|disallowed|not allowed|refused|problem|failed|failure|not permitted)
|no [A-Za-z]+( [A-Za-z]+)? found|invalid|unsupported|not supported|seg(mentation )?fault
|corruption|corrupted|corrupt|overflow|underrun|not ok|unimplemented|unsuccessfull|not implemented
|permerrors?|fehlers?|errore|errors?|erreurs?|fejl|virhe|gre歬a|erro|fel|\(ee\)|\(ni\))
[^A-Za-z_-]|[^\](\$\([^(\))╙+\)|`[^ `[^`╙+`)[^╙|[=>"':.,;({\[][ ]*(false|no valid signature found|no|ko)[ ]*[]=>"':.,;)} ]|
false    | no    | ko    | down    | inactive    |[^A-Za-z_&-]administratively down[^A-Za-z_&-]
Green=[^A-Za-z_&-](pass|accepted|allowed|enabled|connected|successfully|成功|正确|successful|succeeded|success)[^A-Za-z_-]|[=>"':.,;({\[][ ]*(true|yes|ok)[ ]*[]=>"':.,;)} ]
[^A-Za-z_-]|[=>"':.,;({\[][ ]*(true|yes|ok)[ ]*[]=>"':.,;)} ])
Yellow=([^A-Za-z_&-](\[\-w[A-Za-z-]+\]|unassigned|shutdown|discarded|discarding|warn|caught signal [0-9]+|cannot|(connection (to (remote host|[a-z0-9.]+) )?)?(closed|terminated|stopped|not responding)|exited|no more [A-Za-z] available|unexpected|(command |binary |file )?not found|ooo?o?o?ps|out of (space|memory)|low (memory|disk)|(user )?unknown( user)?|disabled|disconnected|deprecated|refused|disconnect(ion)?|advertencia|avvertimento|attention|warnings?|achtung|exclamation|alerts?|warnungs?|advarsel|pedwarn|aviso|varoitus|upozorenje|peringatan|uyari|varning|avertissement|\(ww\)|\(\?\?\)|could not|unable to)[^A-Za-z_-])|([^\](\$[\?@\$][^╙|\$\(\([^(\))]+\)\)[^╙|\$\{[^\}]+\}[^╙|\$\[[^]]+\][^╙|\$[A-Za-z_0-9]+[^A-Za-z_0-9]))
Blue=[^\](\\(033|e)(\[(1;)?(0|30|31|32|33|34|35|36)?m|\((0|b))|\[[0-9.:,]+\]|/dev/null|\|\||\&\&)[^╙
Magenta=([^0-9A-Za-z_&-]([0-9a-f][0-9a-f](:|-)[0-9a-f][0-9a-f](:|-)[0-9a-f][0-9a-f](:|-)[0-9a-f][0-9a-f](:|-)[0-9a-f][0-9a-f](:|-)[0-9a-f][0-9a-f]|localhost|([1-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-4])\.[0-9]+\.[0-9]+\.[0-9]+|null|none)[^0-9A-Za-z_-])|([;▅挨\$\>][ \(]*(for(each)?|while|done|if|then|else|elif|fi|case|esac|endif|exit|eval|shift|read|continue|return)[ ;)])|[^A-Za-z_&-](interface )?(Fa[0-9/]+|Gi[0-9/]+|GigabitEthernet[0-9/]+|FastEthernet[0-9/]+|vlan[0-9]+|Dot11Radio[0-9\\.]+|dot[0-9][A-Za-z0-9\\.]+|bvi[0-9]+)[^A-Za-z_&-]
Cyan=(( |\(|"|'|\[|\])-(-)?[a-zA-Z0-9_-]+( |=|,|\.|\)|"|'|\[|\]))|([^A-Za-z_&-](last (failed )?login:|launching|checking|loading|creating|building|important|booting|starting|notice|informational|informationen|informazioni|informa玢o|oplysninger|informations?|info|informaci髇|informasi|note|\(ii\)|\(\!\!\))[^A-Za-z_-])|([ ;(builtin )?(setenv|export|unset|builtin|shopt|unalias|echo|printf|alias|function|bindkey|setopt|unsetopt|user access verification|switchport|logging event|no ip address|service-policy|vlan-range|spanning-tree|access-list|description|running-config|startup-config|radius-server|class-map|policy-map|media-type|ip address)[ ;)
Blinking=
CaseSensitive=0
  • 6
    点赞
  • 10
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值