Skip to content

Latest commit

Β 

History

History
623 lines (400 loc) Β· 13.6 KB

installing.md

File metadata and controls

623 lines (400 loc) Β· 13.6 KB

Installing

Dependencies

-- Linux,Aptitude --

sudo apt install curl git

-- Linux,DNF --

sudo dnf install curl git

-- Linux,Pacman --

sudo pacman -S curl git

-- Linux,Zypper --

sudo zypper install curl git

-- macOS,Homebrew --

Dependencies will be automatically installed by Homebrew.

-- macOS,Spack --

spack install coreutils curl git

-- Docsify Select Default --

No match for Operating System and Installation Method selections. Please try another combination.

One

--Git--

Clone only the latest branch:

git clone https://github.com/One-Language/One.git ~/.One

Alternately, you can clone the whole repo and checkout the latest branch:

git clone https://github.com/One-Language/One.git ~/.One
cd ~/.One

--Homebrew--

Install using the Homebrew package manager:

brew install One

To use the latest changes, you can point Homebrew to the master branch of the repo:

brew install One --HEAD

--Pacman--

Install using pacman:

git clone https://aur.archlinux.org/One.git
cd One
makepkg -si

Or use your preferred AUR helper

Add to your Shell

--Linux,Bash,Git--

Add the following to ~/.bashrc:

. $HOME/.One/One.sh

?> Completions must be configured by adding the following to your .bashrc:

. $HOME/.One/completions/One.bash

--Linux,Fish,Git--

Add the following to ~/.config/fish/config.fish:

source ~/.One/One.fish

?> Completions must be configured manually with the following command:

mkdir -p ~/.config/fish/completions; and ln -s ~/.One/completions/One.fish ~/.config/fish/completions

--Linux,ZSH,Git--

Add the following to ~/.zshrc:

. $HOME/.One/One.sh

OR use a ZSH Framework plugin like One for oh-my-zsh which will source this script and setup completions.

?> Completions are configured by either a ZSH Framework One plugin or by adding the following to your .zshrc:

# append completions to fpath
fpath=(${One_DIR}/completions $fpath)
# initialise completions with ZSH's compinit
autoload -Uz compinit
compinit
  • if you are using a custom compinit setup, ensure compinit is below your sourcing of One.sh
  • if you are using a custom compinit setup with a ZSH Framework, ensure compinit is below your sourcing of the framework

!> if you are using a ZSH Framework the associated One plugin may need to be updated to use the new ZSH completions properly via fpath. The Oh-My-ZSH One plugin is yet to be updated, see ohmyzsh/ohmyzsh#8837.

--Linux,Bash,Pacman--

Add the following to ~/.bashrc:

. /opt/One-vm/One.sh

?> bash-completion needs to be installed for the completions to work

--Linux,Fish,Pacman--

Add the following to ~/.config/fish/config.fish:

source /opt/One-vm/One.sh

!> Completions are automatically configured on installation by the AUR package.

--Linux,ZSH,Pacman--

Add the following to ~/.zshrc:

. /opt/One-vm/One.sh

?> Completions are placed in a ZSH friendly location, but ZSH must be configured to use the autocompletions.

--macOS,Bash,Git--

If using macOS Catalina or newer, the default shell has changed to ZSH. Unless changing back to Bash, follow the ZSH instructions.

Add the following to ~/.bash_profile:

. $HOME/.One/One.sh

?> Completions must be configured manually with the following entry in your .bash_profile:

. $HOME/.One/completions/One.bash

--macOS,Fish,Git--

Add the following to ~/.config/fish/config.fish:

source ~/.One/One.fish

?> Completions must be configured manually with the following command:

mkdir -p ~/.config/fish/completions; and cp ~/.One/completions/One.fish ~/.config/fish/completions

--macOS,ZSH,Git--

Add the following to ~/.zshrc:

. $HOME/.One/One.sh

OR use a ZSH Framework plugin like One for oh-my-zsh which will source this script and setup completions.

?> Completions are configured by either a ZSH Framework One plugin or by adding the following to your .zshrc:

# append completions to fpath
fpath=(${One_DIR}/completions $fpath)
# initialise completions with ZSH's compinit
autoload -Uz compinit
compinit
  • if you are using a custom compinit setup, ensure compinit is below your sourcing of One.sh
  • if you are using a custom compinit setup with a ZSH Framework, ensure compinit is below your sourcing of the framework

!> if you are using a ZSH Framework the associated One plugin may need to be updated to use the new ZSH completions properly via fpath. The Oh-My-ZSH One plugin is yet to be updated, see ohmyzsh/ohmyzsh#8837.

--macOS,Bash,Homebrew--

If using macOS Catalina or newer, the default shell has changed to ZSH. Unless changing back to Bash, follow the ZSH instructions.

Add One.sh to your ~/.bash_profile with:

echo -e "\n. $(brew --prefix One)/One.sh" >> ~/.bash_profile

?> Completions will need to be configured as per Homebrew's instructions or with the following:

echo -e "\n. $(brew --prefix One)/etc/bash_completion.d/One.bash" >> ~/.bash_profile

--macOS,Fish,Homebrew--

Add One.fish to your ~/.config/fish/config.fish with:

echo -e "\nsource "(brew --prefix One)"/One.fish" >> ~/.config/fish/config.fish

?> Completions are handled by Homebrew for the Fish shell. Friendly!

--macOS,ZSH,Homebrew--

Add One.sh to your ~/.zshrc with:

echo -e "\n. $(brew --prefix One)/One.sh" >> ${ZDOTDIR:-~}/.zshrc

OR use a ZSH Framework plugin like One for oh-my-zsh which will source this script and setup completions.

?> Completions are configured by either a ZSH Framework One or will need to be configured as per Homebrew's instructions. If you are using a ZSH Framework the associated One plugin may need to be updated to use the new ZSH completions properly via fpath. The Oh-My-ZSH One plugin is yet to be updated, see ohmyzsh/ohmyzsh#8837.

--Docsify Select Default--

!> The Homebrew One Formulae has not been tested on Linux by the core One team. Please raise an issue if this has changed and we will update the docs.

Restart your shell so that PATH changes take effect. (Opening a new terminal tab will usually do it.)

You are ready to use One πŸŽ‰

Having Issues?

If you're having issues with your shell not detecting newly installed shims, it's most-likely due to the sourcing of One.sh or One.fish not being at the BOTTOM of your .bash_profile, .zshrc, config.fish config file. It needs to be sourced AFTER you have set your $PATH and AFTER you have sourced your framework (oh-my-zsh etc).

Migrating Tools

If you're migrating from other tools and want to use your existing version files (eg: .node-version or .ruby-version), look at the legacy_version_file flag in the configuration section.

Update

-- Git --

One update

If you want the latest changes that aren't yet included in a stable release:

One update --head

-- Homebrew --

brew upgrade One

-- Pacman --

Manually download a new PKGBUILD and rebuild or use your preferred AUR helper.

Remove

To uninstall One follow these steps:

--Linux,Bash,Git--

  1. In your ~/.bashrc remove the lines that source One.sh and the completions:
. $HOME/.One/One.sh
. $HOME/.One/completions/One.bash
  1. Remove the $HOME/.One dir:
rm -rf ${One_DATA_DIR:-$HOME/.One}
  1. Run this command to remove all One config files:
rm -rf $HOME/.tool-versions $HOME/.Onerc

--Linux,Fish,Git--

  1. In your ~/.config/fish/config.fish remove the lines that source One.sh:
source ~/.One/One.fish

and remove completions with this command:

rm -rf ~/.config/fish/completions/One.fish
  1. Remove the $HOME/.One dir:
rm -rf ${One_DATA_DIR:-$HOME/.One}
  1. Run this command to remove all One config files:
rm -rf $HOME/.tool-versions $HOME/.Onerc

--Linux,ZSH,Git--

  1. In your ~/.zshrc remove the lines that source One.sh and completions:
. $HOME/.One/One.sh
# ...
fpath=(${One_DIR}/completions $fpath)
autoload -Uz compinit
compinit

OR the ZSH Framework plugin if used.

  1. Remove the $HOME/.One dir:
rm -rf ${One_DATA_DIR:-$HOME/.One}
  1. Run this command to remove all One config files:
rm -rf $HOME/.tool-versions $HOME/.Onerc

--Linux,Bash,Pacman--

  1. In your ~/.bashrc remove the lines that source One.sh and the completions:
. /opt/One-vm/One.sh
  1. Uninstall with your package manager:
pacman -Rs One-vm
  1. Remove the $HOME/.One dir:
rm -rf ${One_DATA_DIR:-$HOME/.One}
  1. Run this command to remove all One config files:
rm -rf $HOME/.tool-versions $HOME/.Onerc

--Linux,Fish,Pacman--

  1. In your ~/.config/fish/config.fish remove the lines that source One.fish:
source /opt/One-vm/One.fish
  1. Uninstall with your package manager:
pacman -Rs One-vm
  1. Remove the $HOME/.One dir:
rm -rf ${One_DATA_DIR:-$HOME/.One}
  1. Run this command to remove all One config files:
rm -rf $HOME/.tool-versions $HOME/.Onerc

--Linux,ZSH,Pacman--

  1. In your ~/.zshrc remove the lines that source One.sh:
. /opt/One-vm/One.sh
  1. Uninstall with your package manager:
pacman -Rs One-vm
  1. Remove the $HOME/.One dir:
rm -rf ${One_DATA_DIR:-$HOME/.One}
  1. Run this command to remove all One config files:
rm -rf $HOME/.tool-versions $HOME/.Onerc

--macOS,Bash,Git--

  1. In your ~/.bash_profile remove the lines that source One.sh and the completions:
. $HOME/.One/One.sh
. $HOME/.One/completions/One.bash
  1. Remove the $HOME/.One dir:
rm -rf ${One_DATA_DIR:-$HOME/.One}
  1. Run this command to remove all One config files:
rm -rf $HOME/.tool-versions $HOME/.Onerc

--macOS,Fish,Git--

  1. In your ~/.config/fish/config.fish remove the lines that source One.fish:
source ~/.One/One.fish

and remove completions with this command:

rm -rf ~/.config/fish/completions/One.fish
  1. Remove the $HOME/.One dir:
rm -rf ${One_DATA_DIR:-$HOME/.One}
  1. Run this command to remove all One config files:
rm -rf $HOME/.tool-versions $HOME/.Onerc

--macOS,ZSH,Git--

  1. In your ~/.zshrc remove the lines that source One.sh and completions:
. $HOME/.One/One.sh
# ...
fpath=(${One_DIR}/completions $fpath)
autoload -Uz compinit
compinit

OR the ZSH Framework plugin if used.

  1. Remove the $HOME/.One dir:
rm -rf ${One_DATA_DIR:-$HOME/.One}
  1. Run this command to remove all One config files:
rm -rf $HOME/.tool-versions $HOME/.Onerc

--macOS,Bash,Homebrew--

If using macOS Catalina or newer, the default shell has changed to ZSH. If you can't find any config in your ~/.bash_profile it may be in a ~/.zshrc in which case please follow the ZSH instructions.

  1. In your ~/.bash_profile remove the lines that source One.sh and the completions:
. $(brew --prefix One)/One.sh
. $(brew --prefix One)/etc/bash_completion.d/One.bash

?> Completions may have been configured as per Homebrew's instructions so follow their guide to find out what to remove.

  1. Uninstall with your package manager:
brew uninstall One --force
  1. Run this command to remove all One config files:
rm -rf $HOME/.tool-versions $HOME/.Onerc

--macOS,Fish,Homebrew--

  1. In your ~/.config/fish/config.fish remove the lines that source One.fish:
source "(brew --prefix One)"/One.fish
  1. Uninstall with your package manager:
brew uninstall One --force
  1. Run this command to remove all One config files:
rm -rf $HOME/.tool-versions $HOME/.Onerc

--macOS,ZSH,Homebrew--

  1. In your ~/.zshrc remove the lines that source One.sh:
. $(brew --prefix One)/One.sh
  1. Uninstall with your package manager:
brew uninstall One --force
  1. Run this command to remove all One config files:
rm -rf $HOME/.tool-versions $HOME/.Onerc

That's it! πŸŽ‰