https://github.com/robert-96/py-prompts
Custom prompts for Python.
https://github.com/robert-96/py-prompts
prompt python python2 python3
Last synced: about 2 months ago
JSON representation
Custom prompts for Python.
- Host: GitHub
- URL: https://github.com/robert-96/py-prompts
- Owner: Robert-96
- License: mit
- Created: 2020-12-08T22:59:57.000Z (over 5 years ago)
- Default Branch: main
- Last Pushed: 2022-06-13T02:36:40.000Z (about 4 years ago)
- Last Synced: 2025-03-22T16:37:31.342Z (over 1 year ago)
- Topics: prompt, python, python2, python3
- Language: Shell
- Homepage:
- Size: 1.34 MB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# py-prompts
Custom prompts for Python.

## Installing
```
$ curl -L https://raw.githubusercontent.com/Robert-96/py-prompts/main/install.sh | sh
```
## Quickstart
### List all prompts
```
$ py-prompts list
```
### Set a prompt
```
$ py-prompts set
```
### Add custom prompt
Create a new python file in the `~/.py-prompts/prompts` directory.
You can use this example as a starting point:
```python
import sys
class CustomPromptPS1(object):
def __str__(self):
return ">>> "
class CustomPromptPS1(object):
def __str__(self):
return "... "
sys.ps1 = CustomPromptPS1()
sys.ps2 = CustomPromptPS1()
```
## License
This project is licensed under the [MIT License](LICENSE).