PyCQA / PyCQA/isort

[feature] Shell completion

Open
#2,069 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Python
Stars
7k
Forks
687
Avg merge
4h 56m
Merged PRs (30d)
2

Description

Is it possible that isort provide a tab completion for common shells like:

❯ isort -<TAB>
option
-a                                          ADD_IMPORTS, --add-import ADD_IMPORTS
--ac                                        Ensures the output doesn't save if the resulting file contains syntax errors.
--af                                        Forces import adds even if the original file is empty.
--allow-root                                Tells isort not to treat / specially, allowing it to be run against the root dir.
--append                                    Only adds the imports specified in --add-import if the file contains existing imports.
--append-only                               Only adds the imports specified in --add-import if the file contains existing imports.
--atomic                                    Ensures the output doesn't save if the resulting file contains syntax errors.
...

Maybe shtab can be a possible solution?

TIA!

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by reviewing isort's CLI entry point and the linked shtab examples to understand how completion scripts could be generated for common shells. Confirm which shells and packaging or installation path are in scope, then verify that pressing Tab after isort - exposes the available options.

Written by the indexing model from the issue text.

Assessment

Tech stack
python, shell
Domain
cli
Issue type
Feature
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.