Version manager for Lua, built with ❤️
Luver supports:
Requirements:
- Bash v4 or newer (MacOS ships with older version by default).
export LUVER_DIR="${HOME}/.local/share/luver"
mkdir -p "${LUVER_DIR}"
git clone https://github.com/MunifTanjim/luver.git "${LUVER_DIR}/self"
After doing Git Clone, source the entrypoint:
source "${LUVER_DIR}/self/luver.bash"
or just put this in your .bashrc
file:
export LUVER_DIR="${LUVER_DIR:-"${XDG_DATA_HOME:-"${HOME}/.local/share"}/luver"}"
if [[ ! -d "${LUVER_DIR}/self" ]]; then
git clone --quiet https://github.com/MunifTanjim/luver.git "${LUVER_DIR}/self"
fi
source "${LUVER_DIR}/self/luver.bash"
luver
comes with shell completion script for Bash.
Make sure you have "bash-completion"
package installed on your system.
To generate the shell completion script and store it, run:
luver completion bash | tee "${XDG_DATA_HOME:-"${HOME}/.local/share"}/bash-completion/completions/luver"
Using fisher:
fisher install MunifTanjim/luver
luver
comes with shell completion script for Fish.
If you installed it using fisher, you don't need to do anything else.
To generate the shell completion script and store it, run:
luver completion fish | tee $__fish_config_dir/completions/luver.fish
Using zed:
zed load github.com/MunifTanjim/luver
After doing Git Clone, source the entrypoint:
source "${LUVER_DIR}/self/luver.plugin.zsh"
or just put this in your .zshrc
file:
export LUVER_DIR="${LUVER_DIR:-"${XDG_DATA_HOME:-"${HOME}/.local/share"}/luver"}"
if [[ ! -d "${LUVER_DIR}/self" ]]; then
git clone --quiet https://github.com/MunifTanjim/luver.git "${LUVER_DIR}/self"
fi
source "${LUVER_DIR}/self/luver.plugin.zsh"
luver
comes with shell completion script for Zsh.
To generate the shell completion script _luver
, run:
luver completion zsh > _luver
Then store the _luver
file in one of the directories present in $fpath
variable:
# print the list of fpath directories
echo ${(j.\n.)fpath}
Run luver help
to get started.
Install a Lua version:
luver install lua 5.1.5
Create a Lua version alias:
luver alias 5.4.3 latest
# default version
luver alias 5.1.5 default
Lua version set to default
alias is used automatically when you open a new shell.
Use a specific Lua version (or alias):
# version
luver use 5.3.6
# alias
luver use latest
Get currently used Lua version:
luver current lua
List currently installed Lua versions:
luver list lua
Uninstall a Lua version:
luver uninstall lua 5.3.6
If your currently used Lua is at least v5
, you can install LuaJIT alongside it:
# released version
luver install luajit 2.0.5
# latest git version
luver install luajit 2.1.0-git
The other commands are similar to Lua.
You can install LuaRocks for you currently used Lua version:
luver install luarocks 3.8.0
The other commands are similar to Lua.
You can also use Luver in GitHub Actions workflow!
Check: MunifTanjim/luver-action
Licensed under the MIT License. Check the LICENSE file for details.