Skip to content

dpb587-pivotal/bosh-autocomplete

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

13 Commits
 
 
 
 
 
 
 
 

Repository files navigation

BOSH command autocompletion for bash

This bash script allows you to autocomplete the BOSH subcommands and their options.

For example, if you're not sure what BOSH subcommands are available, and this is script is installed and sourced, then simply type bosh and press Tab twice; you will see a list of BOSH subcommands similar to the following:

$ bosh
add           complete      export        logs          set           task
alias         create        finalize      micro         snapshots     tasks
aliases       delete        generate      properties    ssh           unset
autocomplete  deploy        get           public        start         update
aws           deployment    help          recreate      status        upload
backup        deployments   init          releases      stemcells     validate
blobs         diff          inspect       rename        stop          verify
cancel        disks         instances     reset         sync          version
cleanup       download      locks         restart       take          vm
cloud-config  edit          login         run           target        vms
cloudcheck    errands       logout        scp           targets

Furthermore, once you choose a specific subcommand, you may still enjoy the ability to use auto-complete. For example, say you want to know what the options for bosh create release are: simply type bosh create release and press Tab twice, and you will be presented with the following options

$ bosh create release
--dir                --final              --name               --version
--dry-run            --force              --timestamp-version  --with-tarball

Installation

To install:

$ . BoshAutocompleteGetOpt.sh
$ bosh c[tab]
cancel        cleanup       cloud-config  cloudcheck    complete      create

Future Plans

Auto-completion script is currently auto-generated by patched BOSH CLI, and it can reflect newly-added commands instantly.

e.g.

  1. Add new command bosh delete deployment --all
  2. run:
$ bosh autocomplete > bosh_auto_complete.sh
$ . ./bosh_auto_complete.sh
  1. type bosh delete deployment, and hit tab twice, you will be able to see option --all

If our pull request is accepted, bosh autocomplete will become part of the BOSH CLI.

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published