Skip to content
This repository was archived by the owner on Mar 27, 2022. It is now read-only.

Commit 69d1a69

Browse files
committed
add completition doc
1 parent 58dc825 commit 69d1a69

File tree

1 file changed

+20
-0
lines changed

1 file changed

+20
-0
lines changed

README.md

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,7 @@ To install the package, follow one of the following possibilities. Please note t
3838
2. **Any Platform:** Install via pip: [`pip install qdep`](https://pypi.org/project/qdep/)
3939
3. **Any Platform:** Clone the repository and install the sources directly: `python setup.py install`
4040

41+
### Preparing qmake
4142
After installing (except when using the AUR-package), you have to "enable" qdep for each Qt-Kit you want to use qdep with. This can be done by opening a terminal and calling:
4243
```bash
4344
qdep prfgen --qmake "</path/to/qmake>"
@@ -49,6 +50,25 @@ qdep prfgen --qmake "C:\Qt\5.12.0\msvc2017_64\bin\qmake.exe"
4950

5051
**Note:** Depending on how the corresponding Qt-Kit was installed, you might need to run the command with administrator/sudo permissions. Alternatively, you can call the command with `--dir /some/path` and export that very same path as value to the `QMAKEPATH` environment variable, if you have no such permissions.
5152

53+
### Shell completitions
54+
For Unix systems, qdep makes use of [argcomplete](https://argcomplete.readthedocs.io/en/latest/) to provide completitions for bash/zsh to activate them, add the following code your shell initializer scripts:
55+
56+
For **zsh**, add this to `~/.zshrc`:
57+
```bash
58+
autoload bashcompinit
59+
bashcompinit
60+
autoload compinit
61+
compinit
62+
eval "$(register-python-argcomplete qdep)"
63+
```
64+
65+
For **bash**, add this to `~/.bashrc`:
66+
```
67+
eval "$(register-python-argcomplete qdep)"
68+
```
69+
70+
When using BASH, you can alternatively use global completition - see [Activating global completion](https://argcomplete.readthedocs.io/en/latest/#activating-global-completion) for more details on that. Other shells might work as well, depending on how well argcomplete works with them. Refer to the argcomplete documentation and their GitHub Repository .
71+
5272
## Getting started
5373
The basic usage of qdep is very simple. For this example, we assume you want to add for example [QHotkey](https://github.com/Skycoder42/QHotkey) to a project via qdep. All you have to do is to install (and prepare) qdep and then add the following two lines to your pro-file:
5474

0 commit comments

Comments
 (0)