guumaster / hostctl

Your dev tool to manage /etc/hosts like a pro!

Home Page:http://guumaster.github.io/hostctl

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Documentation update for oh-my-bash for completion using bash

gnud opened this issue · comments

Is your feature request related to a problem? Please describe.
Adding a plugin for new Auto completion system

Describe the solution you'd like
A guide to create oh my bash completion plugin

Describe alternatives you've considered
The code for the completion:

New file in ~/.oh-my-bash/custom/completions/hostctl.completion.sh
with the content of:

hostctl completion bash > ~/.oh-my-bash/custom/completions/hostctl.completion.sh 

based on the help for available commands:

Available Commands:
  bash        Generate bash completion script
  zsh         Generate zsh completion script

then in your ~/.bashrc

completions=(
  ... # other entries
  hostctl
)

then just reload current bash session or re source the ~/.bashrc or open a new terminal tab/window.

Note: it's expected that you have a working Oh-my-bash setup

Additional context

If this feature is desired I will make a pull request to the documentation.