| .. Licensed to the Apache Software Foundation (ASF) under one |
| or more contributor license agreements. See the NOTICE file |
| distributed with this work for additional information |
| regarding copyright ownership. The ASF licenses this file |
| to you under the Apache License, Version 2.0 (the |
| "License"); you may not use this file except in compliance |
| with the License. You may obtain a copy of the License at |
| |
| .. http://www.apache.org/licenses/LICENSE-2.0 |
| |
| .. Unless required by applicable law or agreed to in writing, |
| software distributed under the License is distributed on an |
| "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY |
| KIND, either express or implied. See the License for the |
| specific language governing permissions and limitations |
| under the License. |
| |
| Set Up Bash/Zsh Completion |
| ========================== |
| |
| When using bash (or ``zsh``) as your shell, ``airflow`` can use |
| `argcomplete <https://argcomplete.readthedocs.io/>`_ for auto-completion. |
| |
| For `global activation <https://github.com/kislyuk/argcomplete#activating-global-completion>`_ of all argcomplete enabled python applications run: |
| |
| .. code-block:: bash |
| |
| sudo activate-global-python-argcomplete |
| |
| For permanent (but not global) airflow activation, use: |
| |
| .. code-block:: bash |
| |
| register-python-argcomplete airflow >> ~/.bashrc |
| |
| For one-time activation of argcomplete for airflow only, use: |
| |
| .. code-block:: bash |
| |
| eval "$(register-python-argcomplete airflow)" |
| |
| .. image:: ../img/cli_completion.gif |
| |
| If you’re using ``zsh``, add the following to your ``.zshrc``: |
| |
| .. code-block:: bash |
| |
| autoload bashcompinit |
| bashcompinit |
| eval "$(register-python-argcomplete airflow)" |