Update starship config with ContainerLab module
Add custom module to display ContainerLab topology name when present in the directory
This commit is contained in:
@@ -85,3 +85,13 @@ style = 'bold fg:#E297DB'
|
||||
pyenv_version_name = false
|
||||
detect_extensions = ['py']
|
||||
detect_files = ['.python-version', 'pyproject.toml', 'requirements.txt', 'setup.py', 'Pipfile']
|
||||
|
||||
# Shows if a ContainerLab topology file is present in the current directory
|
||||
[custom.containerlab]
|
||||
description = "Shows ContainerLab topology name when present"
|
||||
command = 'grep -m1 "^name:" *.clab.y*ml 2>/dev/null | head -1 | cut -d: -f2 | xargs'
|
||||
when = 'ls *.clab.yml *.clab.yaml 2>/dev/null | grep -q .'
|
||||
symbol = ' '
|
||||
format = 'via [$symbol($output)]($style) '
|
||||
style = 'bold fg:#C58FFF'
|
||||
shell = ['bash', '--noprofile', '--norc']
|
||||
|
||||
Reference in New Issue
Block a user