Skip to content

Files

Latest commit

e29ccf8 · Jan 27, 2019

History

History

autocomplete

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
Jan 27, 2019
Jan 27, 2019
Jan 24, 2017

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