README_SHELL_COMPLETION 1.1 KB

123456789101112131415161718192021222324252627282930313233
  1. # ossh is an ssh replacement.
  2. ossh uses a dynamic inventory cache in order to lookup hostnames and translate them
  3. to something meaningful such as an IP address or dns name.
  4. This allows us to treat our servers as cattle and not as pets.
  5. If you have not run the ossh command and it has not laid down
  6. a cache file the completions will not be available.
  7. You can populate the cache by running `ossh --list`. This
  8. will populate the cache file and the completions should
  9. become available.
  10. This script will look at the cached version of your
  11. multi_ec2 results in ~/.ansible/tmp/multi_ec2_inventory.cache.
  12. It will then parse a few {host}.{env} out of the json
  13. and return them to be completable.
  14. # BASH
  15. In order to setup bash completion, source the following script:
  16. /path/to/repository/openshift-online-ansible/bin/ossh_bash_completion
  17. # ZSH
  18. In order to setup zsh completion, you will need to verify
  19. that the _ossh_zsh_completion script is somewhere in the path
  20. of $fpath.
  21. Once $fpath includes the _ossh_zsh_completion script then you should
  22. run `exec zsh`. This will then allow you to call `ossh host[TAB]`
  23. for a list of completions.