prompt-toolkit / prompt-toolkit/python-prompt-toolkit
PathCompleter does not append `/` to the end of directory
Nobody has claimed this yet.
- Dominant language
- Python
- Stars
- 10.6k
- Forks
- 815
- PR merge metrics
- No merged PRs in 30d
Description
Zsh autocompletion has the ability to append / to the end of directory with the Tab key, which is super handy.
I wonder whether PathCompleter also has this feature or is it just because I set something wrong?
class prompt_toolkit.completion.PathCompleter(only_directories: bool = False, get_paths: Callable[[], list[str]] | None = None, file_filter: Callable[[str], bool] | None = None, min_input_len: int = 0, expanduser: bool = False)
Complete for Path variables.
Parameters:
get_paths – Callable which returns a list of directories to look into when the user enters a relative path.
file_filter – Callable which takes a filename and returns whether this file should show up in the completion. None when no filtering has to be done.
min_input_len – Don’t do autocompletion when the input string is shorter.
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with the prompt_toolkit.completion.PathCompleter entry point and compare its documented behavior with the directory completion shown in the issue. Determine whether completing a directory should append /, then verify that directory and file completion still behave correctly.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python
- Domain
- cli
- Issue type
- Feature
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 45/100