Is there a way to use the short hostname instead of the FQDN in the console_title_template? #6968
Unanswered
smuskiew
asked this question in
Troubleshoot
Replies: 1 comment
-
|
@smuskiew Try regex matching and replacing as below: "console_title_template": "{{.UserName}}@{{regexReplaceAll `^([^.]+)(\\..*)?$` .HostName `$1`}}:{{.PWD}}"For a hostname |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
In my OMP config I currently have my
console_title_templateusing this:which works great except that my FQDN is rather long so I would like to use the short hostname. Google/AI seems to think I can use filters to do something like
but when I do that it doesn't work at all. I'm sure there is probably some (easy) way to do this but I am admittedly a golang novice so I don't really know what I'm doing here. Can anyone offer a sample config that shows the right way to do this?
Beta Was this translation helpful? Give feedback.
All reactions