question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Tab completion under pipenv?

See original GitHub issue

macOS 10.12.6 Python 3.6.2 pipenv 6.1.6

When I run the CPython REPL from a standard shell tab completion is operative. When I run it via pipenv (pipenv run python3 or pipenv shell then python3) tab completion is not operative.

Is this a bug, or a configuration failure on my part?

Issue Analytics

  • State:closed
  • Created 6 years ago
  • Reactions:6
  • Comments:33 (14 by maintainers)

github_iconTop GitHub Comments

10reactions
andyneffcommented, May 8, 2018

My hack and forget work around is to write a ~/.pyrc file

import sys, os

if (sys.version_info[0] == 2) or ('PIPENV_ACTIVE' in os.environ):
  try:
    import readline
  except ImportError:
    print("Module readline not available.")
  else:
    import rlcompleter
    readline.parse_and_bind("tab: complete")
    del readline, rlcompleter 
del sys, os

And to export PYTHONSTARTUP=~/.pyrc in my shell rc script (export PYTHONSTARTUP=~/.pyrc in ~/bashrc for the bash case)

4reactions
kennethreitzcommented, Sep 8, 2017

so apparently this code activates tab complete:

import rlcompleter, readline
readline.parse_and_bind('tab: complete')
Read more comments on GitHub >

github_iconTop Results From Across the Web

Shell Completion — Pipenv Pipes 0.7.1 documentation
Below are instructions for setting up autocompletion for Bash, Zsh, Fish, and pdksh. Pipes cannot activate an pipenv shell when one is already...
Read more >
Option "completion" not found when installing pipenv on Mac
The error is due to the completion flag being removed from Pipenv since the shell already has completion by using the tab button....
Read more >
Advanced Usage of Pipenv - Python Packaging Authority
Pipenv allows you to open any Python module that is installed (including ones in your codebase), with the $ pipenv open command: $...
Read more >
Python auto-completion in Visual Studio Code for Pipenv project
In order to make writing codes fast, completion is quite important. In this post, I introduce the way to enable completion in Visual...
Read more >
Advanced Usage of Pipenv — pipenv 11.7.2 documentation
Dependencies of wheels provided in a Pipfile will not be captured by $ pipenv lock . ... (including ones in your codebase), with...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found