Skip to content

dinau/nimv

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

17 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Nimv : Simple CUI wrapper for Choosenim command

alt

Install


  1. First install choosenim command
    Refer to https://github.com/dom96/choosenim

  2. Confirm nim version

    $ choosenim stable
           Info: C:\Users\mi\.choosenim\downloads\dlls.zip already downloaded
      Extracting dlls.zip
           Info: Version 1.6.10 already selected
  3. Install anyway other Nim version,

    choosenim 1.6.8
  4. Install Nimv command,

    • Release version

      nimble install https://github.com/dinau/nimv
    • Bleeding edge version (may be same as release version)

      nimble install https://github.com/dinau/nimv@#head
  5. Run Nimv command in MS-DOS/PowerShell Window or terminal window etc,

    nimv

Key operation

Top menu


alt

Selecting other Nim version


Press '1'(one) key to select nim-1.6.10.

alt

Activated nim-1.6.10.

Install other Nim versions


  1. Press 'L' key to list up installable nim versions.

    alt

  2. You can install other nim version by pressing key '0' or '1' or '2'
    at above situation.

  3. You can then go back to top menu by pressing key 'M' or 'R'.

Remove nim versions


  1. Press 'R' key on top menu to remove nim version.

    alt

  2. You can remove nim-1.6.8 by pressing key '0'(zero).

Other key operation


alt

  • Press 'U' key to update to stable version.
  • Press 'P' key to install/update devel version (nim-#devel).

Selecting a version on command line


  1. Start Nimv and get the number '1' of nim-1.6.10 then exit Nimv. alt

  2. You can select nim-1.6.10 by specifying the number '1' on command line as follows,

    nimv 1
  3. You can specify from 0 up to max 9.

Transparently throwing commands to Choosenim


For instance on command line,

nimv 1.4.0
nimv versions
nimv show
nimv remove 1.6.8
snip

are same as

choosenim 1.4.0
choosenim versions
choosenim show
choosenim remove 1.6.8
snip

except nimv --version,

$ nimv --version
nimv 1.3.0 (2023/01): Simple CUI wrapper for Choosenim command.
              from 2021/10 by audin
Usage:
    nimv [option]
       option:
            None : Show simple CUI for Choosenim.
            -h, /?, /h, -v, --version: Show this page.
            -d: Start nimv with debug mode. Shown choosenim command.
    .nimv.json: List of old nim versions and configration to nimv.
                It can be set show/hide to list up the specified nim version.
                This file can be placed in user home folder.``

Debug mode


Start with -d option. It will show debug info while running.

nimv -d

[Optional]: Setup config file '.nimv.json'

Place config file to your home folder


  • Home folder generally is
    • Windows OS: c:\Users\[UserName]\
    • Linux OS: ~/ or /home/[UserName] etc
  1. Copy .nimv.json to your home folder and restart Nimv.
    alt
  2. .nimv.json file correctly loaded.
    alt

Set choosenimDir and nimbleDir option


These options correspond to --choosenimDir and --nimblemDir.

You can set them in .nimv.json for instance,

  • Windows OS

    "choosenimDir":"c:\\foo\\mychDir",
    "nimbleDir":"c:\\bar\\mynbDir",
    snip
  • Linux OS

    "choosenimDir":"~/foo/mychDir",
    "nimbleDir":"~/bar/mynbDir",
    snip

Addition of installble versions to menu


Set value of "1" to "enable:" in .nimv.json for instance,

from

snip
"oldVers":[
  {"enable":1, "ver":"1.6.10", "date":"2022-11-21", "comment":""},
  {"enable":1, "ver":"1.6.8", "date":"2022-09-27", "comment":""},
  {"enable":0, "ver":"1.6.6", "date":"2022-05-05", "comment":""},
  {"enable":0, "ver":"1.6.4", "date":"2022-02-09", "comment":""},
  {"enable":0, "ver":"1.6.2", "date":"2021-12-17", "comment":""},
snip

to

snip
"oldVers":[
  {"enable":1, "ver":"1.6.10", "date":"2022-11-21", "comment":""},
  {"enable":1, "ver":"1.6.8", "date":"2022-09-27", "comment":""},
  {"enable":1, "ver":"1.6.6", "date":"2022-05-05", "comment":""},
  {"enable":1, "ver":"1.6.4", "date":"2022-02-09", "comment":""},
  {"enable":1, "ver":"1.6.2", "date":"2021-12-17", "comment":""},
snip

result in

alt

You can enable up to max 20 versions.

Uninstall Nimv


nimble uninstall nimv

Bye.