tools: use expansion character/string to format home paths in vpm output #19847
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
E.g.
🤖 Generated by Copilot at eca32a9
Improved the output and user experience of
vpm
by adding formatted paths, colors, alignment, and progress indicators. Modified theModule
struct and several functions incmd/tools/vpm/common.v
,cmd/tools/vpm/install.v
, andcmd/tools/vpm/update.v
.🤖 Generated by Copilot at eca32a9
install_path_fmted
to theModule
struct to store a formatted version of the vmodules install path (link, link, link)home_dir
to store the result ofos.home_dir()
function and avoid repeated calls (link)fmt_mod_path
to format the vmodules install path by replacing the home directory with a tilde or an environment variable depending on the OS (link)install_path_fmted
field instead of theinstall_path
field in the output messages of therelocate
,install
,remove
, andupdate
functions ininstall.v
andupdate.v
to make the output more user-friendly and consistent (link, link, link, link, link, link)