diff --git a/.config/starship.toml b/.config/starship.toml index 898e2b4..de906ca 100644 --- a/.config/starship.toml +++ b/.config/starship.toml @@ -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']