linkedin / linkedin/shiv

Supporting tab completion when using the REPL

Open
#44 2 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Python
Stars
1.9k
Forks
114
PR merge metrics
No merged PRs in 30d

Description

Has there been any investigation done into whether/how to support niceties from the normal Python REPL like tab completion and command history?

I've tried using `import site; site.enablerlcompleter()` and `import rlcompleter; import readline; readline.parse_and_bind("tab: complete")` before calling `code.interact()`, but neither seem to be enough.

Contributor guide

Open the contributing guide

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 locating the REPL entry point that calls code.interact and review how Python's readline and rlcompleter behavior applies there. Define the supported tab-completion and command-history behavior, then verify it in the shiv REPL with tests covering the agreed interaction.

Written by the indexing model from the issue text.

Assessment

Tech stack
python
Domain
cli
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.