imomaliev / ptrepl Goto Github PK
View Code? Open in Web Editor NEWRun command as REPL with completion(based on prompt_toolkit)
License: MIT License
Run command as REPL with completion(based on prompt_toolkit)
License: MIT License
I created a temporary virtualenv and installed ptrepl inside. I copied the config snippet from the readme and placed it in ~/.config/ptrepl/config.json
and tried to launch ptrepl. I get the following exception:
$ ptrepl git
Traceback (most recent call last):
File "/Users/amjith/.virtualenvs/tempenv-0f62281434a57/bin/ptrepl", line 11, in <module>
sys.exit(parse_args())
File "/Users/amjith/.virtualenvs/tempenv-0f62281434a57/lib/python3.7/site-packages/ptrepl/cli.py", line 92, in parse_args
main(args.command, prompt=args.prompt)
File "/Users/amjith/.virtualenvs/tempenv-0f62281434a57/lib/python3.7/site-packages/ptrepl/cli.py", line 19, in main
history = FileHistory(get_history_file(command, local_shada_path=local_shada_path))
File "/Users/amjith/.virtualenvs/tempenv-0f62281434a57/lib/python3.7/site-packages/ptrepl/history.py", line 12, in get_history_file
assert '$' not in path, f"Not all environment variables were expanded {path}"
AssertionError: Not all environment variables were expanded $DIRENV_DIR/.direnv/ptrepl/
When I run ptrepl on a given command for the first time and I start from hitting ENTER, ptrepl crashes with following tracebask:
Traceback (most recent call last):
File "/home/foobar/.local/bin/ptrepl", line 10, in <module>
sys.exit(parse_args())
File "/home/foobar/.local/lib/python3.7/site-packages/ptrepl/cli.py", line 94, in parse_args
main(args.command, prompt=args.prompt)
File "/home/foobar/.local/lib/python3.7/site-packages/ptrepl/cli.py", line 69, in main
session.default_buffer.history.get_strings()[-1] = subcommand
IndexError: list assignment index out of range
Hi @imomaliev,
I have a wonderful idea!
What do you think of a feature that would allow the result of executing a specified command is always in the top part of the terminal and the input line is below?
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.