add highlight group for enviornment variable segment

This commit is contained in:
JesseBot 2023-05-19 22:51:53 +02:00 committed by GitHub
parent 833f30e88e
commit 485032da51
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 5 additions and 1 deletions

View File

@ -15,7 +15,11 @@ def environment(pl, segment_info, variable=None):
:param string variable:
The environment variable to return if found
'''
return segment_info['environ'].get(variable, None)
return [{
'contents': segment_info['environ'].get(variable, None),
'highlight_groups': ['environment_variable'],
}]
@requires_segment_info