Skip to content

Commit dc9b6ec

Browse files
committed
feat(shell-completion): added shell completion and migrate to cobra package to better manage command and cli
1 parent 475f9eb commit dc9b6ec

File tree

4 files changed

+272
-182
lines changed

4 files changed

+272
-182
lines changed

README.md

Lines changed: 14 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@ A powerful CLI tool for managing Python virtual environments with ease.
1313
- Upgrade packages globally or per environment
1414
- Clean cache and temporary files
1515
- Smart environment activation
16+
- Shell completion for bash, zsh, fish, and powershell
1617

1718
| Feature | venv-manager | virtualenv | pyenv-virtualenv | Poetry | Pipenv |
1819
|---------|-------------|------------|-----------------|--------|--------|
@@ -22,6 +23,7 @@ A powerful CLI tool for managing Python virtual environments with ease.
2223
| **Clone environments** ||||||
2324
| **Upgrade packages globally or per environment** ||||||
2425
| **Clean cache and temporary files** ||||||
26+
| **Shell completion** ||||||
2527

2628
## One command install 🚀
2729
```bash
@@ -59,22 +61,26 @@ venv-manager upgrade myenv
5961

6062
# Global operations
6163
venv-manager --global clean
64+
65+
# Enable shell completion (bash example)
66+
source <(venv-manager completion bash)
6267
```
6368

6469
## Commands 📖
6570

6671
| Command | Description |
6772
|---------|-------------|
68-
| `create <name> [version]` | Create new environment |
69-
| `activate <name>` | Activate environment |
73+
| `create <n> [version]` | Create new environment |
74+
| `activate <n>` | Activate environment |
7075
| `deactivate` | Deactivate current environment |
7176
| `list` | Show all environments |
72-
| `remove <name>` | Delete environment |
77+
| `remove <n>` | Delete environment |
7378
| `clone <src> <dst>` | Clone environment |
74-
| `packages <name>` | List installed packages |
75-
| `install <name> <reqs>` | Install requirements |
76-
| `upgrade <name>` | Upgrade packages |
77-
| `clean <name>` | Clean cache files |
79+
| `packages <n>` | List installed packages |
80+
| `install <n> <reqs>` | Install requirements |
81+
| `upgrade <n>` | Upgrade packages |
82+
| `clean <n>` | Clean cache files |
83+
| `completion [bash|zsh|fish|powershell]` | Generate shell completion scripts |
7884

7985
## Development 🛠️
8086

@@ -95,4 +101,4 @@ MIT License - See LICENSE file
95101

96102
## Author ✍️
97103

98-
[Jacopo Bonomi](https://github.com/jacopobonomi)
104+
[Jacopo Bonomi](https://github.com/jacopobonomi)

0 commit comments

Comments
 (0)