Skip to content

feat(commands): add version indicators and color coding to list #8

@CalvinAllen

Description

@CalvinAllen

Add visual indicators to distinguish active vs inactive versions in dtvem list output.

Current State

  • ✅ Basic color highlighting exists via ui.HighlightVersion()
  • ✅ "(global)" text indicator shown next to global version
  • ❌ No emoji indicators (🌐 for global, 📍 for local)
  • ❌ No color distinction between active and inactive versions
  • ❌ No local version detection in list output

Remaining Work

Emoji Indicators

  • Add 🌐 emoji next to the global version
  • Add 📍 emoji next to the local version (from .dtvem/runtimes.json in current directory or parent)

Color Coding

  • Color code versions based on active status:
    • GREEN - Currently active version (based on current directory context)
    • WHITE/DEFAULT - Installed but not active
  • Use ui.Success style (green) for active version

Local Version Support

  • Query local .dtvem/runtimes.json (walk up directory tree) for local version
  • Handle case where global and local are the same version (show both indicators)

Example Output

$ dtvem list node
  18.0.0
  20.0.0  🌐 (global)
  22.0.0  📍 (local)   ← GREEN (active)

Implementation Notes

  • Active version follows priority: local > global > none
  • Can reuse config.ResolveVersion() logic for local detection
  • Location: src/cmd/list.go

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions