Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion src/vectorcode/cli_utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -358,7 +358,7 @@ def get_cli_parser():
)
prompts_parser.add_argument(
"prompt_categories",
choices=PromptCategory,
choices=[str(i) for i in PromptCategory],
type=PromptCategory,
nargs="*",
help="The subcommand(s) to get the prompts for. When not provided, VectorCode will print the prompts for `query`.",
Expand Down
14 changes: 14 additions & 0 deletions tests/test_cli_utils.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
import os
import subprocess
import sys
import tempfile
from typing import Any, Dict
from unittest.mock import patch
Expand Down Expand Up @@ -539,3 +541,15 @@ def test_cleanup_path():
"~", "test_path"
)
assert cleanup_path("/etc/dir") == "/etc/dir"


def test_shtab():
for shell in ("bash", "zsh", "tcsh"):
assert (
subprocess.Popen(
[sys.executable, "-m", "vectorcode.main", "-s", shell],
stderr=subprocess.PIPE,
)
.stderr.read()
.decode()
) == ""