1
0
mirror of https://github.com/octoleo/hosts.git synced 2024-11-14 09:14:13 +00:00
hosts/etc
2020-04-13 16:36:58 -07:00
..
hosts-completion.bash Reconfigure completion setup. 2020-04-13 16:36:58 -07:00
hosts-completion.zsh Reconfigure completion setup. 2020-04-13 16:36:58 -07:00
README.md Reconfigure completion setup. 2020-04-13 16:36:58 -07:00

Installation instructions

Homebrew

If you're using Homebrew, just run brew install xwmx/taps/hosts and the completion scripts will be installed automatically. The extra steps to install hosts completion scripts outlined below are not needed.

A one-time setup might be needed to enable completion for all Homebrew programs.

bash

Linux

On a current Linux OS (in a non-minimal installation), bash completion should be available.

Place the completion script in /etc/bash_completion.d/:

sudo curl -L https://raw.githubusercontent.com/xwmx/hosts/master/hosts-completion.bash -o /etc/bash_completion.d/hosts

macOS

If you aren't installing with homebrew, source the completion script in .bash_profile:

if [[ -f /path/to/hosts-completion.bash ]]
then
  source /path/to/hosts-completion.bash
fi

zsh

Place the completion script in your /path/to/zsh/completion (typically ~/.zsh/completion/):

$ mkdir -p ~/.zsh/completion
$ curl -L https://raw.githubusercontent.com/xwmx/hosts/master/hosts-completion.zsh > ~/.zsh/completion/_hosts

Include the directory in your $fpath by adding in ~/.zshrc:

fpath=(~/.zsh/completion $fpath)

Make sure compinit is loaded or do it by adding in ~/.zshrc:

autoload -Uz compinit && compinit -i

Then reload your shell:

exec $SHELL -l