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/luverluver 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.fishUsing zed:
zed load github.com/MunifTanjim/luverAfter 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 > _luverThen 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.5Create a Lua version alias:
luver alias 5.4.3 latest
# default version
luver alias 5.1.5 defaultLua 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 latestGet currently used Lua version:
luver current luaList currently installed Lua versions:
luver list luaUninstall a Lua version:
luver uninstall lua 5.3.6If 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-gitThe other commands are similar to Lua.
You can install LuaRocks for you currently used Lua version:
luver install luarocks 3.8.0The 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.