Skip to content

Latest commit

 

History

History
50 lines (37 loc) · 1.28 KB

README.md

File metadata and controls

50 lines (37 loc) · 1.28 KB

Oneclient shell completion scripts

These are Bash and Zsh completion scripts for oneclient.

Installation

Bash

The oneclient.bash-completion script can be either directly loaded to the current Bash session using:

source oneclient.bash-completion

Alternatively, the script can be copied to the /etc/bash_completion.d (or on OSX with Homebrew to /usr/local/etc/bash_completion.d) under oneclient name:

sudo cp oneclient.bash-completion /etc/bash_completion.d/oneclient

Make sure to the following lines are uncommented in the ~/.bashrc:

if [ -f /etc/bash_completion ]; then
  . /etc/bash_completion
fi

OS X

On OSX you might need to install bash-completion using Homebrew:

brew install bash-completion

Make sure to the following lines are uncommented in the ~/.bashrc:

if [ -f $(brew --prefix)/etc/bash_completion ]; then
  . $(brew --prefix)/etc/bash_completion
fi

Zsh

In Zsh, the _oneclient Zsh completion file must be copied to one of the folders under $FPATH variable, and the Zsh terminal should be reopened.

For testing, _oneclient completion function can be updated without restarting zsh:

# First copy _oneclient somewhere under $FPATH
$ unfunction _oneclient
$ autoload -U _oneclient