Skip to content

Enhance the Installation for Windows CMD #254

@Hamster5295

Description

@Hamster5295

The autojump.exe itself is not sufficient to provide the expected function on windows cmd prompt, while installing the python autojump and overriding the script cause confusion. There could be better approaches.

The python autojump actually does 2 things through installation:

  1. Adding the path to the scripts to the PATH env.
  2. Binding autojump.lua to clink so that the script can hook and record the changes in working directories.

The Powershell requires extra intergrations, which is absent currently.

As for Windows CMD, it's possible to provide some other approaches for installation.

Install Script

This can be achieved through the following steps:

  1. Include autojump.lua and those .bat scripts into the windows_msvc package.
  2. Add a install.bat or what to the package. The script can be something like this:
REM Setting the PATH env varible
setx /m PATH "%PATH%;%~dp0"

REM Bind autojump.lua to clink
REM TODO: Warn user when clink is not present
clink installscripts "%~dp0"

Scoop

The Scoop package manager has added this project into the 'extras' bucket(A manifest that explains where and how to install a software). See ScoopInstaller/Extras#8377
Currently the scoop-installed autojump-rs cannot function as well, due to the same reason given. However, scoop provides the ability to run scripts at installation / uninstallation as well as dependency lookup, which make it possible to automaticly check the presence of clink and configure the environment.

  1. Include autojump.lua and those .bat scripts into the windows_msvc package. This is the same as above
  2. Modify the scoop manifest for auto installation, dependency check and more: https://github.com/ScoopInstaller/Extras/blob/master/bucket/autojump.json

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions