vfox icon indicating copy to clipboard operation
vfox copied to clipboard

[Feature]: swallow 'v' letter in version while installing

Open ZuBB opened this issue 5 months ago • 9 comments

Can we make vfox (prefereably) swallow v letter (vfox i nodejs@v22.17.0) while doing install?

vasyl@phoenix ~/work/*****e $ vfox i [email protected]
plugin [PreInstall] method error: /Users/vasyl/.version-fox/plugin/nodejs/hooks/pre_install.lua:23: cannot perform concat operation between string and nil
stack traceback:
        /Users/vasyl/.version-fox/plugin/nodejs/hooks/pre_install.lua:23: in main chunk
        [G]: ?
failed to install nodejs
vasyl@phoenix ~/work/*****e $ vfox i [email protected]
Preinstalling [email protected]...
Downloading... 100% [=================================================================================================================================================================================================================] (35 MB/s)
Verifying checksum 615dda58b5fb41fad2be43940b6398ca56554cbe05800953afadc724729cb09e...
Unpacking /Users/vasyl/.version-fox/cache/nodejs/node-v22.17.0-darwin-arm64.tar.gz...
Install [email protected] success!
Please use vfox use [email protected] to use it.
vasyl@phoenix ~/work/*****e $

ZuBB avatar Jul 03 '25 06:07 ZuBB

支持这个建议,一开始我也打错了vfox install nodejs@v24,建议自动忽略v

tianyiw2013 avatar Jul 22 '25 05:07 tianyiw2013

It seems to be a very reasonable feature. I have encountered this problem before as well. Maybe we just need to remove the prefix 'v' when passing it to the Lua plugin, right? Would there be any plugins that depend on this prefixed 'v' behavior?

@version-fox/vfox-committers @version-fox/vfox-maintainers

bytemain avatar Jul 22 '25 06:07 bytemain

after some investigation, I think we can remove the prefix "v" from the user's input statements.

bytemain avatar Jul 22 '25 06:07 bytemain

a more radical version of this: how about ditching 'v' letter everywhere: both in input and output?

ZuBB avatar Jul 22 '25 07:07 ZuBB

A more radical version of this: how about dropping the 'v' letter everywhere: both in input and output?

output: What exactly does it refer to?

yeshan333 avatar Jul 22 '25 07:07 yeshan333

A more radical version of this: how about dropping the 'v' letter everywhere: both in input and output?

output: What exactly does it refer to?

vasyl@phoenix /tmp $ vfox current nodejs
-> v22.17.1
vasyl@phoenix /tmp $

again, v in version

ZuBB avatar Jul 22 '25 07:07 ZuBB

Yes, vfox search nodejs will also show vXxx

bytemain avatar Jul 22 '25 08:07 bytemain

  • This seems to be something that can be done in the plugin implementation code? When I wrote the documentation for https://shardingsphere.apache.org/document/current/en/user-manual/shardingsphere-jdbc/graalvm-native-image/development/#windows , I never included a v for the java plugin.
vfox add java 
vfox install [email protected] 
vfox use --global [email protected]

linghengqian avatar Jul 22 '25 11:07 linghengqian

Image

The same problem, vfox displays the character v when displaying, but cannot correctly handle the character v when inputting. I think we need to maintain consistency in display and operation, or always ignore v.

fangzhengjin avatar Oct 31 '25 02:10 fangzhengjin