利用xshell里面的突出显示集,自动以正则表达式,使自己的xshell显示不再单调
菜单——工具——突出显示集
新建一个新的突出显示集
添加如下关键字
underline
要强调的关键字 | \b(http(s)?://[A-Za-z0-9_./&?=%~#{}()@+-]+)\b |
文本颜色 | 白色 |
背景颜色 | 终端颜色 |
red
要强调的关键字 | (\b(bad|wrong|incorrect|invalid|unsupported|not properly|improperly|(operation |connection |authentication |access |permission )?(false|no|ko|denied|disallowed|not allowed|refused|problem|failed|failure|not permitted)|no [A-Za-z]+( [A-Za-z]+)? found|invalid|unsupported|not supported|corruption|corrupted|corrupt|overflow|underrun|not|unsuccessfull|errore|errors?|erreurs?|erro|red|inactive)\b) |
文本颜色 | 红色 |
背景颜色 | 终端颜色 |
green
要强调的关键字 | (\b(true|yes|ok|accepted|allowed|enabled|connected|erfolgreich|exitoso|successo|sucedido|framgångsrik|successfully|successful|succeeded|success|succeed|done|green)\b) |
文本颜色 | 绿色 |
背景颜色 | 终端颜色 |
yellow
要强调的关键字 | (\b(\[\-w[A-Za-z-]+\]|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|(o)+ps|out of (space|memory)|low (memory|disk)|unknown|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)|yello\b) |
文本颜色 | 黄色 |
背景颜色 | 终端颜色 |
Magenta
要强调的关键字 | (\b(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)\b) |
文本颜色 | 品红 |
背景颜色 | 终端颜色 |
Cyan
要强调的关键字 | (\b(last (failed )?login:|launching|checking|loading|creating|building|important|booting|start(ing)?|notice|informational|informationen|informazioni|informação|oplysninger|informations?|info|información|informasi|note|\(ii\)|\(\!\!\))\b) |
文本颜色 | 青色 |
背景颜色 | 终端颜色 |
root提示符
要强调的关键字 | [?[_a-z0-9-]+@[_a-z0-9-]+ \S+]?#|\w+@\w+:\S+# |
文本颜色 | 红色 |
背景颜色 | 暗红 |
其他用户提示符
要强调的关键字 | [?[_a-z0-9-]+@[_a-z0-9-]+ \S+]?(>|\$)|\w+@\w+:\S+\$ |
文本颜色 | 黑色 |
背景颜色 | 蓝色 |
百分比
要强调的关键字 | \d+\s?\.?\d{0,2}% |
文本颜色 | 紫红,下划线 |
背景颜色 | 终端颜色 |
自定义字符
要强调的关键字 | \b(down|abnormal|delay|not|disable|connect|delet[a-zA-Z]*|edit|end|begin)\b |
文本颜色 | 橙色 |
背景颜色 | 终端颜色 |
临时关注
要强调的关键字 | normal|finished|ready|version.sh|SERVICE_INFO |
文本颜色 | 粉色,下划线 |
背景颜色 | 终端颜色 |
注:如果是从堡垒机跳转,第一次连接该节点,需要在突出显示集中选择这个显示集,设置为当前组