Skip to content

Commit

Permalink
Client will install bash completion file.
Browse files Browse the repository at this point in the history
JIRA: PDC-1161
  • Loading branch information
zkl94 committed Nov 13, 2015
1 parent 05280ef commit 9981c98
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 8 deletions.
6 changes: 6 additions & 0 deletions docs/source/pdc_client.rst
Original file line number Diff line number Diff line change
Expand Up @@ -85,6 +85,12 @@ requests manually.
This is much more user friendly user interface. A single invocation can perform
multiple requests depending on what subcommand you used.

Although auto-completion is inherently enabled for pdc, it will be disabled if
`python-argcomplete` is not installed. To enable it, install `python-argcomplete`
and activate by typing `activate-global-python-argcomplete` in command line.
Please note that by doing this only global completion is enabled which is
currently not compatible with zsh.


Python API
----------
Expand Down
1 change: 1 addition & 0 deletions pdc_client/bin/pdc
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
#! /usr/bin/env python
# PYTHON_ARGCOMPLETE_OK
# -*- coding: utf-8 -*-
#
# Copyright (c) 2015 Red Hat
Expand Down
9 changes: 1 addition & 8 deletions pdc_client/runner.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,14 +12,7 @@
import logging
import imp

# The client supports Bash completion if argcomplete Python package is
# installed. To enable it, run this in your terminal (assuming pdc is somewhere
# on path).
#
# eval "$(register-python-argcomplete pdc)"
#
# This is only a temporary solution, when the client is packaged, a completion
# file should be shipped with it and installed to /etc/bash_completion.d/.
# The client supports Bash completion if argcomplete Python package is installed.
try:
import argcomplete
except ImportError:
Expand Down

0 comments on commit 9981c98

Please sign in to comment.