Bug 1463362

Summary: [RFE] Include zsh completions
Product: OpenShift Container Platform Reporter: Marko Myllynen <myllynen>
Component: RFEAssignee: Derek Carr <decarr>
Status: CLOSED CURRENTRELEASE QA Contact: Xiaoli Tian <xtian>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 3.5.0CC: aos-bugs, jokerman, mmccomas
Target Milestone: ---   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2018-02-08 13:39:19 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Marko Myllynen 2017-06-20 16:02:36 UTC
Description of problem:
Please include zsh completions for oc/oadm/openshift in the corresponding RPMs and enable them by default for zsh users.

Comment 1 Paul Weil 2018-02-08 13:39:19 UTC
zsh completion is already included.  Instructions for enabling them are available in oc and can be added to a user's profile to ensure they are enabled.

$ oc completion --help
This command prints shell code which must be evaluated to provide interactive completion of oc commands.

Usage:
  oc completion SHELL [options]

Examples:
  # Generate the oc completion code for bash
  oc completion bash > bash_completion.sh
  source bash_completion.sh
  
  # The above example depends on the bash-completion framework.
  # It must be sourced before sourcing the openshift cli completion,
  # i.e. on the Mac:
  
  brew install bash-completion
  source $(brew --prefix)/etc/bash_completion
  oc completion bash > bash_completion.sh
  source bash_completion.sh
  
  # In zsh*, the following will load openshift cli zsh completion:
  source <(oc completion zsh)
  
  * zsh completions are only supported in versions of zsh >= 5.2

Use "oc options" for a list of global command-line options (applies to all commands).